Afficher un message
Vieux 30/10/2006, 19h32   #4
Bill Marcum
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Question re: braces and quotes

On Mon, 30 Oct 2006 13:18:15 GMT, Peter
<peter@localhost.com> 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.
  Réponse avec citation
 
Page generated in 0,04520 seconds with 9 queries