On 2005-01-07 09:36, Tom Vilot <[EMAIL PROTECTED]> wrote:
>Eric F Crist wrote:
>> What is the point of the { } around some variables?
>
> It's not strictly necessary, except in some cases. i.e:
>
> m=34
> echo $m
>
> You don't need it there.

> But you would want it here:
>
> f=/var/filename
> fname=${f//name/name2}

Or when characters adjacent to the variable name may be difficult to
separate from the name itself:

        disk="ad0"
        slice="${disk}s1"
        partition="${slice}a"
        #
        echo "${disk} ${partition} ${slice}"

- Giorgos

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to