On Oct 27, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote:
> ----------------------------------------
> default="a b c"
> : ${list1=$default}
> : ${list2="$default"}
> echo "$list1" | cat -v
> echo "$list2" | cat -v
> ----------------------------------------
> gives two different results?
Nope, I get the same output for both lines. Why would it be
different?
> How do these guy behave?
> ----------------------------------------
> default="a b c"
> : list1=${list1-$default}
> : list2=${list2-"$default"}
> echo "$list1" | cat -v
> echo "$list2" | cat -v
> ----------------------------------------
This won't even set list1 and list2, since `:' == `true' will be run
with `list[12]=...', which is not what you want. Removing `:', I get
the expected output.
> default="a b c"
> : list1=${list1=$default}
> : list2=${list2="$default"}
> echo "$list1" | cat -v
> echo "$list2" | cat -v
This works on Ultrix both with and without `:'.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me