Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Quoting strings
- X-seq: zsh-users 15761
- From: Jérémie Roquet <arkanosis@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Quoting strings
- Date: Wed, 2 Feb 2011 10:30:25 +0100
- Cc: Anonymous bin Ich <ichbinanon@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=BWdX9GXnwbEevoG4gqiuI3s5lPsT1Ph61/H0be4a1/Y=; b=hldl+fa82QK1cNacZTH9zs3q8e2e5wo+yJMMB8obdZOPS7UIaUEs4qot1T/lOLFut3 vCOT3mSZ+9Um5eBz2IoEu0XrpzHM+iy8DDrBzvzy5xGV5cpsXXpC5eaJu52mI2GONkRO hODAlIXlYVCM4ozPg8CN2ap/YKjYI9rrmqXiA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=e38zjyRcug7ObJT8uOtDL6Rr7zoXSGqah4vr04MYLbpPCnzKJvN+WF/aceSKbbHD6b 9KXRuhux3070YUMG3gK4DlnYzK1kAPriXxZwZ8PjjOIOqTX0PMKRAtbOHW6y5nbXcQ62 dp5P33oB2u5FSorlzM4KBS1xUcctNlSwePaok=
- In-reply-to: <4D48CFEC.30603@gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <4D48CFEC.30603@gmail.com>
Hi,
2011/2/2 Anonymous bin Ich <ichbinanon@xxxxxxxxx>:
> I have a string1='ls'
> and string2='-l | cut -d " " -f6'
>
> Now I create a new string3="$string1 $string2"
>
> It all looks fine but when I try to run it via $($string3) I get:
>
> +./working.zsh:7> '/bin/ls -l |cut -d " " -f6'
> ./working.zsh:7: no such file or directory: /bin/ls -l |cut -d " " -f6
You are looking for the `eval' builtin:
$ eval $string3
Best regards,
--
Jérémie
Messages sorted by:
Reverse Date,
Date,
Thread,
Author