Search Results

Search: Posts Made By: euval
1,938
Posted By TRB
How about this: echo "xx yy zz" | awk...
How about this:


echo "xx yy zz" | awk 'BEGIN{FS=" "}{ for (i=1; i<=(NF-1); i++) { printf("%s,", $i); } printf("%s\n", $NF); }'
1,938
Posted By ahamed101
Try this echo "xx yy zz" | awk '{for (i=1;...
Try this

echo "xx yy zz" | awk '{for (i=1; i<NF-1; i++) printf "%s, ", $i; printf "%s & %s",$(NF-1),$NF}'

regards,
Ahamed
2,377
Posted By Franklin52
awk '$2<2{print $1}' file
awk '$2<2{print $1}' file
6,542
Posted By durden_tyler
Not tested - wget -c ftp://ftpsite/file...
Not tested -


wget -c ftp://ftpsite/file 2>&1 | awk '/0%/ {printf("%s\r",$0)} END{print}'


tyler_durden
2,107
Posted By rdcwayx
var=155 awk -v s=$var 's {gsub(/\[|\]/,"");for...
var=155
awk -v s=$var 's {gsub(/\[|\]/,"");for (i=1; i<=NF; i++) {split($i,a,","); if (a[1]==s) print a[2]} }' infile
2,107
Posted By Franklin52
With sed: sed -n '/\[155,/...
With sed:
sed -n '/\[155,/ s/.*155,\([^]]*\)].*/\1/p' file
1,558
Posted By danmero
See if this work for you: # cat sample.file ...
See if this work for you:
# cat sample.file
IMAGE INPUT
81 0 0.995 2449470 0 1726 368 1 0.0635 0.3291
82 0 1.001 2448013 0 1666 365 1 0.0649 ...
1,558
Posted By Chirel
As i already said on the other post : awk...
As i already said on the other post :
awk '/ACCEPTED/{print "processing images "x" - "y" Average is "int(tot/nb)}/IMAGE/{getline;tot=nb=0;x=$1}$7>0{tot+=$7;nb++}NF{y=$1}' file
4,971
Posted By Chirel
awk '/ACCEPTED/{print "processing images "x" -...
awk '/ACCEPTED/{print "processing images "x" - "y" Average is "int(tot/nb)}/IMAGE/{getline;tot=nb=0;x=$1}$7>0{tot+=$7;nb++}NF{y=$1}' file
4,971
Posted By danmero
One way. awk '/ACCEPTED/{print "processing...
One way.
awk '/ACCEPTED/{print "processing images "x" - "y;exit}/IMAGE/{getline;x=$1}NF{y=$1}' file
Showing results 1 to 10 of 10

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