[Nix-dev] slightly off topic: bash/sh quoting/arguments

Mathijs Kwik mathijs at bluescreen303.nl
Mon Apr 2 23:59:44 CEST 2012


On Mon, Apr 2, 2012 at 11:33 PM, Eelco Dolstra
<eelco.dolstra at logicblox.com> wrote:
> Hi,
>
> On 02/04/12 23:28, Mathijs Kwik wrote:
>
>> args1="one two"
>> args2="three four"
> ...
>> $ mycommand $args1 $args2
>> You passed 2 arguments
>
> Eh?  Unless you have set $IFS to a non-standard value, $args1 and $args2 will be
> split into four arguments.

Ah, my bad.
It seems bash and sh work fine, my zsh seems to be the problem.
I blindly assumed zsh was mostly sh compatible

>
> --
> Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev


More information about the nix-dev mailing list