![]() |
|
|
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 |
| Replacing a string in nth line | maxmave | Shell Programming and Scripting | 1 | 06-04-2008 06:32 PM |
| need help with replacing a certain field... | shennanigan83 | Shell Programming and Scripting | 5 | 04-09-2008 02:00 AM |
| replacing a nul field with text | DarkHound | Shell Programming and Scripting | 3 | 09-04-2007 03:34 PM |
| Replacing more than 1 pattern in a line | Manan | Shell Programming and Scripting | 6 | 12-28-2006 01:58 AM |
| Replacing certain field | charbel | Shell Programming and Scripting | 1 | 04-26-2006 05:00 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Replacing the last field of a line.
Hi,
I wrote a script which extracts data from 2 tables (joining the tables together) and outputs the fields to a csv file. the output may look something like scenario 1: a,b,c,d,1,2,3,4 or scenario 2: a,b,c,d,,,, now, in the second scenario, there are some empty fields at the end of the line. Basically what I need to do is insert a "0" in the last field if it comes back empty after the database extraction, and i'm not sure how I can do this. Any help? thanks, |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|