Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: danmero
1,228
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...
13,648
Posted By durden_tyler
perl -plne 's/^(\w+)_F3/$1/' datafile
perl -plne 's/^(\w+)_F3/$1/' datafile
1,788
Posted By Scrutinizer
awk -F, \$3 file
awk -F, \$3 file
3,880
Posted By ctsgnb
sa+=($2<0)?-$2:$2 could also be ...
sa+=($2<0)?-$2:$2
could also be
sa+=sqrt($2^2)
7,421
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,074
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,159
Posted By rdcwayx
awk -F, '$6!="\"\"" ' infile
awk -F, '$6!="\"\"" ' infile
4,923
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.
10,983
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,168
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

 

Featured Tech Videos

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