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 -->
  #10 (permalink)  
Old 10-31-2007
vikas027 vikas027 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 77
Quote:
Originally Posted by vgersh99 View Post
Sorry 'bout that - some awk's increment pre-increment ops don't seem to work the way they supposed to.

Code:
awk '/SERVER/{if (n++) close(output); output= f n} n {print >> output }' f=/vikas/list /vikas/final

On Solaris - use 'nawk' or '/usr/xpg4/bin/awk'

hello friend,

this command is only making two files list1 & list2.

Thanks.