The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 12-19-2008
pbrowne pbrowne is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 7
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
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0