Search Results

Search: Posts Made By: nike27
1,261
Posted By Scrutinizer
Try something like awk '{A[$1]=!C[$1]++? $0 :...
Try something like awk '{A[$1]=!C[$1]++? $0 : A[$1] OFS $NF} END{for(i in A) print A[i]}' FS=, OFS=\| file
2,371
Posted By EAGL€
$2==$2 means to compare the second column to next...
$2==$2 means to compare the second column to next second column right? if so why you have used $2==$2 as they are not equal when $1==$1 right?
2,371
Posted By Scrutinizer
Actually I do not understand why $1==$1 &&...
Actually I do not understand why $1==$1 && $2==$2; is there. IMO it has no function and could just be left out.

--
This should be equivalent to the suggestion in post #2:
awk '{p=$NF; getline;...
2,371
Posted By in2nix4life
cat file ES FP,B1ES FP,70000,I,SL22,SL22...
cat file

ES FP,B1ES FP,70000,I,SL22,SL22 (70000)
ES FP,B2ES FP,80000,I,XX22,XX22 (80000)
VIL SJ,B1VIL SJ,20000,I,SL22,SL22 (20000)
VIL SJ,B2VIL SJ,20000,I,XX22,XX22 (20000)
VIL SJ,S3VIL...
Showing results 1 to 4 of 4

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