The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

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 05:52 PM
echo using single quotes chella Shell Programming and Scripting 3 10-28-2007 09:54 PM
how to put quotes ina .sql file agarwalniru UNIX for Advanced & Expert Users 9 06-11-2007 08:26 AM
Help Please. Need to add quotes to o field tjbopp Shell Programming and Scripting 13 02-10-2006 01:52 PM
quotes wannabe_guru UNIX for Dummies Questions & Answers 4 04-12-2004 06:25 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-24-2005
Registered User
 

Join Date: Jun 2005
Posts: 26
I want the output within quotes

Hi

I want to store the output of this command within double quotes ?
How can i do that ?

nows=`date +%Y-%m-%e`

The output is 2005-06-24

I want the output as "2005-06-24".
I tried with few options but only in vain.
do let me know how to go about it ?

Thanks in advance.

cheers,
gops
Reply With Quote
Forum Sponsor
  #2  
Old 06-24-2005
Just Ice's Avatar
Lights on, brain off.
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 629
nows=$(echo \"$(date +%Y-%m-%e)\")
Reply With Quote
  #3  
Old 06-24-2005
vgersh99's Avatar
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 3,024
now='"'`date +%Y-%m-%e`'"'
Reply With Quote
  #4  
Old 06-24-2005
RishiPahuja's Avatar
Registered User
 

Join Date: Apr 2005
Location: Bangalore, India
Posts: 203
Thumbs up here u go

Try this

nows=\"`date +%Y-%m-%e`\"
Reply With Quote
  #5  
Old 06-24-2005
Registered User
 

Join Date: Jun 2005
Posts: 26
Wonderful Just ice,

That was what i expected and thanks a lot for Providing me the same.

cheers,
gops
Reply With Quote
  #6  
Old 06-24-2005
Registered User
 

Join Date: Jun 2005
Posts: 26
Thanks everybody for providing me the solution in different ways.

cheers,
gops
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 02:09 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0