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
Double quotes or single quotes when using ssh? password636 Shell Programming and Scripting 3 05-29-2008 08:52 PM
awk to print ' (single quotes) orahi001 UNIX for Dummies Questions & Answers 2 03-11-2008 04:30 PM
Checking Single Quotes in C janemary.a High Level Programming 3 06-07-2007 02:48 AM
im stuck! 'single quotes' satnamx UNIX for Dummies Questions & Answers 4 03-29-2006 06:44 AM
Filename containing Single Quotes phani Shell Programming and Scripting 6 03-30-2005 06:47 AM

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-26-2007
chella chella is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 75
echo using single quotes

Hi,

Please help me to echo the following statement using single quotes

Why can't I write 's between single quotes

Thanks in advance,
Chella
  #2 (permalink)  
Old 10-26-2007
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
Code:
echo "Why can't I write 's between single quotes"
  #3 (permalink)  
Old 10-26-2007
earnstaf earnstaf is offline
Registered User
  
 

Join Date: May 2007
Posts: 113
If I understand your problem, you are trying to do:
Code:
echo 'why doesn't this work?'
You'll need to escape the inner ' so it is seen literally.

Code:
echo 'shouldn\'t this work fine?'
  #4 (permalink)  
Old 10-29-2007
chella chella is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 75
Thank You for the reply.

But still I am not able to get the required output.

echo 'shouldn\'t this work fine?'

when I tried the above statement it asks to use another single quote at the end.

Please help me.

Regards,
Chella
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 04:26 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