The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 06-21-2005
vgersh99's Avatar
vgersh99 vgersh99 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,131
something to start with:

nawk -f hell.awk file.txt

hell.awk:

Code:
BEGIN { FS=OFS="^" }
{
    arr[$1] = ($1 in arr) ? arr[$1] "," $3 : $3
}
END {
  for (i in arr)
    print i OFS "~", arr[i]
}