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
Need help to escape special characters in Korn shell script rogers42 UNIX for Dummies Questions & Answers 6 05-14-2009 07:23 AM
Searching for escape characters timcs Shell Programming and Scripting 8 05-25-2007 06:29 AM
awk / escape character OFFSIHR Shell Programming and Scripting 8 11-29-2006 01:28 PM
number of escape characters? Sebarry Shell Programming and Scripting 0 06-22-2006 04:23 PM
lp FormFeed Escape characters jgordon UNIX for Advanced & Expert Users 4 10-15-2003 02:01 PM

Closed Thread
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
  #1 (permalink)  
Old 11-05-2006
sharsin2001 sharsin2001 is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 9
escape characters..

hey
i want to know the unix commands to replace all the character escape sequences with their "C" values in a string...
thanks in advance..!
Regards,
Sharanya
  #2 (permalink)  
Old 11-05-2006
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
What do you mean by C sequences? Do you mean that you want the hex values of the escape sequences? You could look at 'od'.
  #3 (permalink)  
Old 11-05-2006
sharsin2001 sharsin2001 is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 9
Escape

The C is character values...like\" shud be replaced by " ..\t is replaced by horizontal tab\v by vertical tab and so on..
  #4 (permalink)  
Old 11-06-2006
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
maybe this is what you are looking for: http://www.cppreference.com/escape_sequences.html
  #5 (permalink)  
Old 11-06-2006
sharsin2001 sharsin2001 is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 9
escape characters..

hii..
thatz the exact one i need but i need unix shell script commands for that..
  #6 (permalink)  
Old 11-06-2006
sharsin2001 sharsin2001 is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 9
escape..

I guess we can use sed command for this but then i am understanding how to use it...
  #7 (permalink)  
Old 11-06-2006
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
do you mean that you want to read a text file and wherever a newline is present, replace it with \n, wherever a single quote is present, replace it with \' etc.?
Closed Thread

Bookmarks

Tags
unix commands

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 08:11 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