![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| FTP - shell script question | bsandeep_80 | Shell Programming and Scripting | 6 | 09-09-2008 07:26 AM |
| Shell Script question | ryanique | Shell Programming and Scripting | 10 | 08-26-2008 03:08 PM |
| Linux Shell Question: how to print the shell script name ? | meili100 | UNIX for Dummies Questions & Answers | 3 | 07-01-2008 02:55 PM |
| Shell script question | jbou1087 | Shell Programming and Scripting | 2 | 05-06-2008 03:01 AM |
| A shell script question | surjyap | Shell Programming and Scripting | 2 | 11-24-2005 05:48 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
shell script question
Hi,
The contents of my file is below: Name,Location,Degree,Gender,Awards Robert,Philadelphia,Accounting,Male,5 Jane,Chicago,Business,Female,2 Allan,New York,Engineering,Male,6 Tom,Detroit,Computer Science,Male,10 Nancy,Milwaukee,Engineering,Female,4 I want to add a "ID" in the 1st line and the default codes (001) in front of the 2nd to last line. Also, to insert a Salary (which is default at 3000) after the Degree field. Output should now look like below: ID,Name,Location,Degree,Salary,Gender,Awards 001,Robert,Philadelphia,Accounting,3000,Male,5 001,Jane,Chicago,Business,3000,Female,2 001,Allan,New York,Engineering,3000,Male,6 001,Tom,Detroit,Computer Science,3000,Male,10 001,Nancy,Milwaukee,Engineering,3000,Female,4 Would anyone be able to suggest? Thanks. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|