I'm not quite sure what you mean but each space denotes a new argument
(multiple spaces mean more arguments which get bundled into an array) so
using the approach you used to assign to $i is correct for specifying a
single argument
../test1 "'1234 5678' 22 33 zzz"
n
"Test" <olli.marx@xxxxxx> wrote in message
news:%23xEdbDN%23IHA.4784@xxxxxx
Quote:
> Hi,
>
> there are two scripts
>
> test1.ps1:>
> test2.ps1: Quote:
> > $i = "'1234 5678' 22 33 zzz"
> > ./test1 $i
>
> Running test2 -> Output Quote:
> > '1234 5678' 22 33 zzz
>
> but it should be like
> test3.ps1: Quote:
> > ./test1 '1234 5678' 22 33 zzz
>
> Running test3 -> Output: Quote:
> > 1234 5678
> > 22
> > 33
> > zzz
>
> How can I use a normal string - without converting it to an array - as a
> variable. Or I'm totally blind?