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 -->
  #6 (permalink)  
Old 03-18-2009
rikxik's Avatar
rikxik rikxik is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 250
It has to be some issue with your file. I got correct output from both commands:

Code:
$ paste -d" " - - < file1
1 2
3 4
5 6
7 8
$ nawk 'ORS=(FNR%2)?FS:RS' file1
1 2
3 4
5 6
7 8