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 -->
  #1 (permalink)  
Old 03-19-2009
chandrakala chandrakala is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 13
need a help in shell scripting

Hi Folks,
I need a help in shell scripting.

I have a CSV file which got 1000 records in it..here it goes

KRW71,GAMDE1,D,14656,17909.5,20090217,48324,20090202,22060,K,23897,,,,2,Truck,27.2,,,O,T
KRW71,GAMDE1,D,14656,17909.5,20090217,48325,20090203,22060,K,10430,,,,1,Truck,13.6,,,O,T
KRW71,GAMDE1,D,14656,17909.5,20090217,48326,20090204,22060,K,20376,,,,2,Truck,27.2,,,O,T
KRW71,GAMDE1,D,14656,17909.5,20090217,48327,20090205,22060,K,19338,,,,1,Truck,13.6,,,O,T
KRW71,GAMDE1,D,14656,17909.5,20090217,48328,20090206,22060,K,20682,,,,1,Truck,13.6,,,O,T

I want to add a tag FBINV at the beginning of each line if its not present already.

Can you please help me out in writing a script for above one.


Any help would be apptreciated.

Thanks in advance