The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 02-07-2007
radoulov's Avatar
radoulov radoulov is online now Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,892
With awk:

GNU Awk
Code:
awk '{print $3,$7}' RS= FS="[ :\n]" OFS=":" file1 file2
nawk
Code:
nawk '{print $3,$7}' RS= FS="[\\\\n: ]" OFS=":" file1 file2