Re: Question re: braces and quotes



On Mon, 30 Oct 2006 13:18:15 GMT, Peter
<peter@xxxxxxxxxxxxx> wrote:
# base is one of hourly, daily, etc. single word, no spaces
# lockdir has slashes but no spaces

if [ -e ${LOCKDIR}/cron.$BASE ]

Is BASE not quoted or braced because it is a single word with no escape
type chars? Why is LOCKDIR in braces? Why are quoted UNnecessary?

As far as I know, it is always safe to use braces. Possibly the script
was written by two or more people, or the author had previously written
something that required braces, such as ${LOCKDIR:-default}


--
If your hands are clean and your cause is just and your demands are
reasonable, at least it's a start.
.