[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] When are double quotes necessary?
From: |
adrelanos |
Subject: |
[Help-bash] When are double quotes necessary? |
Date: |
Sat, 14 Sep 2013 12:52:47 +0000 |
Just an example.
temp="/etc/"
file="name"
a)
config_file="$temp/$file"
b)
config_file=""$temp"/"$file""
c)
config_file=$temp/$file
d)
i=0
e)
i="0"
First, a) vs b). I like the look and feel of a) more. Is b) necessary
and/or advised in this case?
Actually, c) should work as well, but it is not advised, because if
temp="/etc/ ", this could be end in a disaster just of because an
extra space.
For trivial cases, such as d) vs e), are quotes still recommended?
- [Help-bash] When are double quotes necessary?,
adrelanos <=