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 07-03-2009
lathavim lathavim is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 73
Try this....There should be some other better solution..


Code:
csplit -f out inputfile '/SEL/'
grep 'CBLO' out00 >tmp1
sed 's/.*/&,BUY/' tmp1 >finalout
grep 'CBLO' out01 >tmp2
sed 's/.*/&,SEL/' tmp2 >>finalout


Last edited by Neo; 07-03-2009 at 11:23 AM.. Reason: code tags
Bits Awarded / Charged to lathavim for this Post
Date User Comment Amount
07-03-2009 Neo added code tags for user -5,000