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
Remove double quotes deepakwins UNIX for Dummies Questions & Answers 3 05-30-2008 12:53 PM
Double quotes or single quotes when using ssh? password636 Shell Programming and Scripting 3 05-29-2008 09:52 PM
how to put quotes ina .sql file agarwalniru UNIX for Advanced & Expert Users 9 06-11-2007 12:26 PM
Help Please. Need to add quotes to o field tjbopp Shell Programming and Scripting 13 02-10-2006 04:52 PM
I want the output within quotes gopskrish UNIX for Dummies Questions & Answers 5 06-24-2005 11:17 AM

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 04-08-2004
wannabe_guru wannabe_guru is offline
Registered User
  
 

Join Date: Apr 2004
Posts: 6
quotes

is there a difference between quotes at the beginning of a line of code and quotes at the end of a code?
e.g.
"code here "

this book i read has 2 different meanings for beginning and end quotes
  #2 (permalink)  
Old 04-08-2004
Optimus_P Optimus_P is offline Forum Advisor  
flim flam flamma jamma
  
 

Join Date: May 2001
Location: Chicago IL, USA
Posts: 1,006
quote the book.

there are 2 differnt styles of quotes and each set of quotes is comprised of an open quote and a closeing quote.

you have a litteral quote (single quote) ' $fred '
this will equal litterly $fred

then you have a interpretive quote (double quote) " $fred "
this will equal the value of $fred.
  #3 (permalink)  
Old 04-12-2004
wannabe_guru wannabe_guru is offline
Registered User
  
 

Join Date: Apr 2004
Posts: 6
still dont understrand

I still do not understand the double quotes.

all that my unix book says about the double quotes is previous context (first double quote) and at first non white (second double quote)

e.g. " code here "

does anyone have know?
  #4 (permalink)  
Old 04-12-2004
google's Avatar
google google is offline Forum Advisor  
Moderator
  
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
Please reply back to your original thread, do not make new threads when replying. This thread now makes no sense by itself!

As far as quotes go, it is very simple. You have 3 flavors, ' (single quote), " (double quote), and ` (back quote). The back quote is the key immediately to the left of the '1' key on a standard US keyboard.

Anything surrounded by single quotes is a What you see is what you get quote. Meaning, the shell does not expand any variables inside of single quotes.

Example:
#Given the variable FOO which is set to BAR.
FOO=BAR
echo 'This will print $FOO on the screen'

This will print $FOO on the screen

Using Double quotes will cause the variable to be interpolated.
FOO=BAR
echo 'This will print $FOO on the screen'

This will print BAR on the screen

The back ticks ` cause execution of the command sequence inside of the backquotes before assignment to a variable is made.

Example:
Given a user named iamyou
FOO=`whoami`

echo $FOO
iamyou
  #5 (permalink)  
Old 04-12-2004
norsk hedensk norsk hedensk is offline Forum Advisor  
Registered User
  
 

Join Date: Jul 2002
Location: new york
Posts: 1,025
threads merged.
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 02:06 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