The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
screen control characters ajcannon Shell Programming and Scripting 2 09-18-2007 04:18 AM
Which one is faster to remove control m characters? madhunk Shell Programming and Scripting 11 08-16-2006 12:55 PM
Remove control characters aravind_mg UNIX for Dummies Questions & Answers 5 10-02-2002 01:07 PM
getting rid of control characters apalex UNIX for Dummies Questions & Answers 2 07-12-2001 02:12 AM
printing control characters mglinsk UNIX for Dummies Questions & Answers 1 09-20-2000 04:42 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-15-2003
hillxy hillxy is offline
Registered User
  
 

Join Date: Oct 2003
Posts: 2
Question how to replace control characters using sed?

How can I use sed to replace a ctrl character such as 'new line' (\0a) to something else? Or any other good command can do this job?

Thanks,
Hillxy
  #2 (permalink)  
Old 10-15-2003
oombera's Avatar
oombera oombera is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2002
Location: Cleveland, OH
Posts: 804
As a general rule, you'll find an answer a lot faster if you search first. Then, if you still cannot find the answer you're looking for, post your question.

Removing carriage return characters from file
  #3 (permalink)  
Old 10-16-2003
linuxer_rh linuxer_rh is offline
Registered User
  
 

Join Date: Aug 2003
Location: china
Posts: 7
sed 's/new line/\0a/' yourfile
  #4 (permalink)  
Old 10-16-2003
oombera's Avatar
oombera oombera is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2002
Location: Cleveland, OH
Posts: 804
linuxer_rh: What does that line do?

From my understanding, hillxy is not looking to replace the exact phrase "new line". And he isn't looking to replace anything with the control character \0a ... he's looking to replace the control character \0a
  #5 (permalink)  
Old 10-16-2003
linuxer_rh linuxer_rh is offline
Registered User
  
 

Join Date: Aug 2003
Location: china
Posts: 7
excuse me . my english is really poor and im a
newbie too

tr "\n" "your chars"<your file

Last edited by linuxer_rh; 10-16-2003 at 11:56 PM..
  #6 (permalink)  
Old 10-16-2003
hillxy hillxy is offline
Registered User
  
 

Join Date: Oct 2003
Posts: 2
Thanks, 'tr' works.

Thanks
Closed Thread

Bookmarks

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 07:08 PM.


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