James G. Sack (jim) wrote: > John H. Robinson, IV wrote: > >.. > >$ a="one two three"; program $a > > a="'one two three'"; program "$a" > > gives the desired single-token arg > > > > > $ a='"one two three"'; set $a; echo $1.$2.$3 > > "one.two.three" > > a="one two three"; set "$a"; echo "($1) ($2)" > gives > (one two three) ()
Yep. That is the way to turn a sh array into a sh scalar. That is the problem, people do not often quote their variable names, causing the problems that people experience when there are spaces in variable names. % zsh -c 'a="one two three";set $a;echo :$1: :$2:' :one two three: :: % bash -c 'a="one two three";set $a;echo :$1: :$2:' :one: :two: -john -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
