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
Minicom runscript: How to send escape character ( \ ) rkhanna Shell Programming and Scripting 1 10-02-2008 10:14 AM
read a variable character by character, substitute characters with something else vipervenom25 UNIX for Dummies Questions & Answers 2 06-06-2008 03:18 PM
awk / escape character OFFSIHR Shell Programming and Scripting 8 11-29-2006 01:28 PM
Escape character in vi? stevefox Shell Programming and Scripting 4 11-17-2005 03:38 PM
possible to escape the \ character in sed? gammaman UNIX for Dummies Questions & Answers 1 07-07-2005 02:49 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 02-16-2007
deepakpv deepakpv is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 11
Escape character

Hi ,
I want to change space to ' in my script.
I tried doing this,

sed 's/ /\'/g' filename

but i could not get it.
can some one help me please.
Thanks,
Deepak
  #2 (permalink)  
Old 02-16-2007
andryk's Avatar
andryk andryk is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2003
Posts: 448
try the double quote
Code:
sed -e "s/ /\'/g" file
  #3 (permalink)  
Old 02-16-2007
vish_indian vish_indian is offline
Registered User
  
 

Join Date: Jun 2006
Location: Delhi, India
Posts: 92
sed "s/ /'/g" filename works for me.
  #4 (permalink)  
Old 02-16-2007
deepakpv deepakpv is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 11
Quote:
Originally Posted by andryk
try the double quote
Code:
sed -e "s/ /\'/g" file
Thanks Andryk.
It worked
  #5 (permalink)  
Old 02-16-2007
deepakpv deepakpv is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 11
Thanks Vish.
Sponsored Links
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 11:26 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