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 UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 12-02-2007
skywayterrace skywayterrace is offline
Registered User
 

Join Date: Dec 2007
Posts: 2
Creating a csv file based on Existing file

Hi I am Newbie to Unix.Appreciate Help from forum

user would loada b.Csv File(Below example) in /data/m/ directory.Program need to read the b.csc to extract certain column and create a new file /data/d/ directory as csv file with new name.

User File Format

1232,samshouston,12345 houston,56666,20030811,78576,5,EA,789,SHELL
1456,dellshouston,2222 houston, 5644666,20030811,78576,5,EA,789,dell

need to extract column1,column3,column4,column5,column7
and one more condition if the column4 length is lessthan 6 then add 000 before

output wil look like in /data/o/tran.csv

1232,12345 houston,00056666,20030811,78576
1456,2222 houston,5644666,20030811,78576



Appreciate your help

thanks

Skyway
Reply With Quote
Remove advertisements
!!
Forum Sponsor