![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Fill the Key fields : Please help us | charandevu | Shell Programming and Scripting | 11 | 04-08-2008 09:40 AM |
| Fixed length (Fill out) | peterk | Shell Programming and Scripting | 3 | 09-28-2007 11:04 AM |
| Esc key/Auto-fill | mr_manny | SUN Solaris | 3 | 10-30-2005 07:12 PM |
| how to include field separator if there are blank fields? | ReV | Shell Programming and Scripting | 19 | 07-13-2005 04:50 AM |
| awk: How to check if field is blank? | yongho | Shell Programming and Scripting | 7 | 06-09-2005 11:35 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
fill a NIL into the blank field
Hello,
I have a record which split with "," I would like to check..if the field is empty and it will field "NIL" into the field. input 45111,40404,peter,,0303403,0,030304,john,,9,0, output 45111,40404,peter,NIL,0303403,0,030304,john,NIL,9,0, |
|
||||
|
Quote:
Code:
sed -e "s/,,/,NIL,/g" file > tmp mv tmp file |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|