The UNIX and Linux Forums  

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




Thread: awk help
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 05-26-2009
garethsays garethsays is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 14
so far....

awk '{a=$1;b=$2;getline;c=$2;print a,c}' input_file

which gives me an output from my original input file of

a d
e h

and I was expecting
a d
c f
e h

Any ideas???

Thanks