![]() |
|
|
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 |
| sed to remove 1st two characters every line of text file | ajp7701 | Shell Programming and Scripting | 20 | 06-09-2009 05:06 PM |
| Best way to remove sections of text from a file | cals64 | Shell Programming and Scripting | 8 | 09-22-2008 01:16 PM |
| remove specified text from file | raidzero | Shell Programming and Scripting | 2 | 06-19-2008 10:10 AM |
| remove the text (*@yahoo.com, hotmail.com) from one file | juniorbear | Shell Programming and Scripting | 11 | 06-15-2008 08:37 AM |
| how to remove ^M from windows text file in unix | pragy1999 | Shell Programming and Scripting | 1 | 04-13-2006 11:04 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
unable to remove \240 from a text file
I have a file originally provided from a SQL database on a Windows platform.
I transfer the file via ftp in binary format, remove the ^M's from the end of all lines. I have attempted to use tr ( cat infile | tr -d '\240' ) and sed (cat infile | sed 's/\240//g' ) to remove the occurences of \240 in the file with no luck. I have no problem removing this octal character in vi. If i run the Windows command, 'type infile', \240 shows up as an a with a grave over it. In notepad, it shows up as a space. I need to incorporate into a script a method of deleting these octal characters because other unix commands fail w/ the following error: can't read STDIN: Illegal byte sequence Any ideas would be greatly appreciated. Thx in advance, pat Last edited by pbrowne; 12-19-2008 at 12:14 PM.. |
| Bookmarks |
| Tags |
| shell script, shell scripting, unix commands, unix scripting, unix scripting basics |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|