LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Quotes in bash (https://www.linuxquestions.org/questions/linux-newbie-8/quotes-in-bash-827017/)

Mr. Alex 08-18-2010 10:08 AM

Quotes in bash
 
Are " and ' quotes the same for bash? Using them seems to show no difference, but is there any difference indeed?

stuart_cherrington 08-18-2010 10:11 AM

Have a look at http://mywiki.wooledge.org/BashPitfalls he's got some good examples of what they do and what they do badly!

konsolebox 08-18-2010 08:54 PM

See what this means
Code:

IFS=1234
VAR=1234
echo $VAR


Valery Reznic 08-19-2010 01:59 AM

Quote:

Originally Posted by Mr. Alex (Post 4070315)
Are " and ' quotes the same for bash? Using them seems to show no difference, but is there any difference indeed?

Try:
Code:

var=this_is_var_value
echo "$var"
echo '$var'


colucix 08-19-2010 02:12 AM

Simple and effective explanation here: http://www.gnu.org/software/bash/man...f.html#Quoting


All times are GMT -5. The time now is 06:56 AM.