Search Results

Search: Posts Made By: danmero
1,580
Posted By Don Cragun
Hi pareshkp, You might also want to try a...
Hi pareshkp,
You might also want to try a slightly simpler awk script:
awk -F'[<=>]' '{printf("%s%s",$(NF-2),(NR%5)?(NR%5==1)?" ":";":ORS)}' Input

which with your sample input produces the...
15,547
Posted By durden_tyler
perl -plne 's/^(\w+)_F3/$1/' datafile
perl -plne 's/^(\w+)_F3/$1/' datafile
3,845
Posted By Scrutinizer
awk -F, \$3 file
awk -F, \$3 file
4,802
Posted By ctsgnb
sa+=($2<0)?-$2:$2 could also be ...
sa+=($2<0)?-$2:$2
could also be
sa+=sqrt($2^2)
9,439
Posted By rdcwayx
$ cat infile 24x18g 12x18g 300g 24x18Kg ...
$ cat infile
24x18g
12x18g
300g
24x18Kg
12x18Kg
300Kg

$ awk -Fx '{t=$0;gsub(/[0-9x]/,"",t);$0=($1*($2?int($2):1)) t}1' infile

432g
216g
300g
432Kg
216Kg
300Kg
1,269
Posted By durden_tyler
"Dear" OP, It's unethical to ask for...
"Dear" OP,

It's unethical to ask for ready-to-go solutions in a forum of volunteers. You will have to learn to put in some effort in doing your homework before asking for help.

Since we are...
2,755
Posted By rdcwayx
awk -F, '$6!="\"\"" ' infile
awk -F, '$6!="\"\"" ' infile
5,383
Posted By Scrutinizer
Try indenting your code. Then I think it will be...
Try indenting your code. Then I think it will be obvious where the problem is.
15,530
Posted By Scrutinizer
wc -l testfile|0m0.488s wc -l <...
wc -l testfile|0m0.488s
wc -l < testfile|0m0.493s
gawk 'END{printf ("%d\n", NR)}' testfile|0m5.220s
mawk 'END{printf ("%d\n", NR)}' testfile|0m2.133s
sed -n '$=' testfile|0m14.833s
grep -c \$...
2,644
Posted By durden_tyler
Why not figure out all your problems and jot down...
Why not figure out all your problems and jot down all your questions in a single post, instead of asking them in installments ?

tyler_durden
Showing results 1 to 10 of 10

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