![]() |
|
|
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 |
| parsing a string in a shell script | asutoshch | Shell Programming and Scripting | 19 | 05-26-2008 10:18 PM |
| shell script parsing with sed | jjamd64 | UNIX for Dummies Questions & Answers | 5 | 12-11-2007 04:51 PM |
| Parsing a line in Shell Script | unishiva | Shell Programming and Scripting | 3 | 11-01-2007 04:30 PM |
| Shell script for parsing 300mb log file.. | gurpreet470 | Shell Programming and Scripting | 3 | 02-09-2007 04:38 AM |
| Parsing a file in Shell Script | sendhilmani123 | Shell Programming and Scripting | 4 | 11-30-2006 02:29 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Help in parsing a CSV file with Shell script
I have a CSV file which contains number series as one of the fields. Some of the records of the field look like :
079661/3 I have to convert the above series as 079661 079662 079663 and store it as 3 different records. Looking for help on how to achieve this. Am a newbie at Shell scripting. Thanking all in advance for the help.. Mihir |
|
||||
|
thanks..but it ignores '0' in the beginning
echo '079661/3' | awk -F'/' '{for(i=0; i<$2; i++) print $1+i}'
79661 79662 79663 Since this is a phone number series, I don't want the 0's in the beginning to be ignored. Thanks a lot for your response. Mihir |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|