|
|
|
|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | 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. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
handling null values in files
Hi ,
I have a script where i will remove header and trailer record and ftp to another server. I'm using the code: latestfilename=`ls filename_* | tail -1` echo "Latest filename = $latestfilename" sed '1d;$d' $latestfilename > a.ftpedfile I have an issue if input data is having null values.The data looks like this: Input record has :00223715232238200 N NULL 1999031920000707 abc * In place of NULL i have a null. MY output is : 00223715232238200 N 1999031920000707 abc * The record is shifted. Please advice how to transfer null as it is.And also please let me know if i ftp the file with null values the values should not be dropped. Thanks in advance! |
| Sponsored Links |
|
|
|
|||
|
The "sed" command should not alter lines that were not selected.
However, FTP may "help" you by converting text files. If the files are transferred as binary instead of ASCII, then they shall remain unmodified. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| identifying null values in a file | dsravan | Shell Programming and Scripting | 3 | 02-12-2008 05:28 PM |
| Null Character Handling | npk2210 | Shell Programming and Scripting | 3 | 09-29-2007 05:51 AM |
| Handling null input... | DrRo183 | Shell Programming and Scripting | 2 | 04-11-2006 02:32 AM |
| Null handling in scripts | mohanprabu | Shell Programming and Scripting | 3 | 01-20-2005 04:50 PM |
| Null values after emptying a log file | kasie4life | Shell Programming and Scripting | 2 | 10-07-2004 10:36 AM |