Search Results

Search: Posts Made By: SunilB2011
1,930
Posted By Scrutinizer
Try: awk -F@ '!A[$0=$2]++' file
Try:
awk -F@ '!A[$0=$2]++' file
1,591
Posted By Scrutinizer
Try: awk -FFROM: 'NF>1{print $2}' file sed -n...
Try:
awk -FFROM: 'NF>1{print $2}' file
sed -n 's/.*FROM://p' file
1,036
Posted By elixir_sinari
awk 'NF && /open[ \t]*$/{sub(/[...
awk 'NF && /open[ \t]*$/{sub(/[ \t]*\(\?\).*/,"");print "Port opened for",$0;next}
NF && /Connection refused[ \t]*$/{sub(/[ \t]*\(\?\).*/,"");print "Port cannot be reached for",$0}'...
Forum: Red Hat 06-21-2012
25,394
Posted By fpmurphy
What happens when you set NFS_CLIENT_VERSMAX=3 in...
What happens when you set NFS_CLIENT_VERSMAX=3 in /etc/default/nfs and restart your NFS server?
Forum: Red Hat 06-21-2012
25,394
Posted By hicksd8
I've experienced this problem in the past and...
I've experienced this problem in the past and remember having to fight it.

I recommend that you ease all security until you make is work and then tighten up afterwards. I can confirm that it can...
Forum: Solaris 02-10-2012
17,481
Posted By rbatte1
The cron deamon will still have the old clock. ...
The cron deamon will still have the old clock. You will need to stop it. It may be defined in /etc/inittab as respawn in which case it will start a new one for you.




Robin...
Forum: Solaris 02-10-2012
17,481
Posted By itkamaraj
use back tick and check it once again ...
use back tick and check it once again

dt1=`perl -e 'use POSIX;print strftime "%d-%m-%Y-%M",localtime time-86400;'`
Forum: Solaris 02-10-2012
17,481
Posted By itkamaraj
redirect your stderr and stdout 0-59 * * *...
redirect your stderr and stdout

0-59 * * * * /var/tmp/r.sh 1>/tmp/out.txt 2>&1
Forum: Solaris 02-10-2012
17,481
Posted By itkamaraj
use the absolute path for the files mv...
use the absolute path for the files

mv /absolute/path/local0.log local0.log.$dt1
mv /absolute/path/local1.log local1.log.$dt1
mv /absolute/path/local2.log local2.log.$dt1
Forum: Solaris 02-10-2012
17,481
Posted By bartus11
Post output of: tail -50 /var/cron/log
Post output of: tail -50 /var/cron/log
3,713
Posted By kumaran_5555
user@host> (/home/user) $ a=10 user@host>...
user@host> (/home/user) $ a=10
user@host> (/home/user) $ vi test.sh
user@host> (/home/user) $
user@host> (/home/user) $
user@host> (/home/user) $ ./test.sh

user@host> (/home/user) $ echo $a...
3,713
Posted By kumaran_5555
It is working fine for me.Please check whether...
It is working fine for me.Please check whether your IP is correct and try to FTP manually for that IP.

user@host2> (/home/user) $ cat test.sh
#!/bin/bash
function upload(){
ftp -inv...
3,713
Posted By kumaran_5555
function upload(){ ftp -inv $hostname <<EOF ...
function upload(){
ftp -inv $hostname <<EOF
user $user_name $pass_word
put $file_name
bye
EOF
}
This will work. You wrote the function wrong.
3,713
Posted By kumaran_5555
you have to use ftp -inv $hostname ...
you have to use


ftp -inv $hostname
user $user_name $pass_word
3,713
Posted By luckybalaji
I didnt test this. Hope this will work. I have...
I didnt test this. Hope this will work. I have given just a skeleton you need some work to make this work.


upload()
{
ftp $hostname
user $user_name
password $password
put $file_name...
2,237
Posted By ctsgnb
# awk -F"[,%]"...
# awk -F"[,%]" '{x=$(NF-1);if(m<x)m=x;s+=x}END{printf "max=%.1f%%\nsum=%.1f\navg=%.1f%%\n",m,s,s/NR}' infile
max=98.5%
sum=1061.7
avg=96.5%Use nawk or /usr/xpg4/bin/awk if running on SunOS/Solaris...
2,237
Posted By getmmg
perl -F, -lane 'BEGIN{$max=0;$avg=0;$i}...
perl -F, -lane 'BEGIN{$max=0;$avg=0;$i} $i++;$F[7]=~s/%//g; $max=$F[7] if($F[7]>$max); $avg+= $F[7];END{print $max;print($avg/$i)}'

Thanks,
MG
1,777
Posted By kumaran_5555
Try: awk '{if ((NR %2)== 1){ f = $2;print $0;}...
Try:
awk '{if ((NR %2)== 1){ f = $2;print $0;} else {printf "%s %s\n",$0,f} }' test.txt

This assumes the alternate occurrance of echo and awk
2,237
Posted By kumaran_5555
Give multiple file names seperated by space...
Give multiple file names seperated by space instead of just 'file'
2,237
Posted By kumaran_5555
awk -F, 'BEGIN{max=0;total=0}{if((100-$8) >...
awk -F, 'BEGIN{max=0;total=0}{if((100-$8) > max){max =(100-$8)};total=total+(100-$8)}END{print max,total/NR}' text.txt
2,237
Posted By bartus11
awk -F, '{sub ("%","",$8);sum+=100-$8;if...
awk -F, '{sub ("%","",$8);sum+=100-$8;if (100-$8>max){max=100-$8}}END{printf "max=%.1f%\navg=%.1f%\n",max,sum/NR}' file
2,237
Posted By ningy
long but effective and easy approach!! a=`cat...
long but effective and easy approach!!
a=`cat filename |awk -F"," '{print $8}' |tr "%" " " |sort |tail -1`
b=`cat filename |awk -F"," '{print $8}' |tr "%" " " |awk '{c +=$1}END{print c}'`
e=`cat...
2,237
Posted By Franklin52
Another approach: awk -F"[,%]"...
Another approach:
awk -F"[,%]" '{max=$(NF-1)>max?$(NF-1):max; som+=$(NF-1)}END{print max, som/NR}' file
2,237
Posted By bartus11
Try: awk -F, '{sub ("%","",$8);sum+=$8;if...
Try: awk -F, '{sub ("%","",$8);sum+=$8;if ($8>max){max=$8}}END{printf "max=%.1f\%\navg=%.1f\%\n",max,sum/NR}' file
2,237
Posted By kumaran_5555
awk -F, 'BEGIN{max=0;total=0}{if($8 > max){max...
awk -F, 'BEGIN{max=0;total=0}{if($8 > max){max =$8};total=total+$8}END{print max,total/NR}' text.txt
Showing results 1 to 25 of 39

 
All times are GMT -4. The time now is 05:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy