Search Results

Search: Posts Made By: sirrtuan
1,782
Posted By shamrock
awk -F\| '{ if (NR>1) { if (x[$1])...
awk -F\| '{
if (NR>1) {
if (x[$1]) x[$1] = x[$1] "," $2
else {y[NR] = $1; x[$1] = "|"$2}
} else print
} END {
for (i=2;i<=NR;i++)
if (y[i] in x) print y[i]...
1,782
Posted By Corona688
$ awk -F"|" 'NR==1{ print; next}; {...
$ awk -F"|" 'NR==1{ print; next};
{ A[$1]=A[$1] ", " $2 }
END { for(X in A) {
print X "|" substr(A[X], 2);
} }' datafile

Name |...
Showing results 1 to 2 of 2

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