Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: is variable with variable name possible?
- X-seq: zsh-users 15921
- From: Jérémie Roquet <arkanosis@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: is variable with variable name possible?
- Date: Mon, 4 Apr 2011 15:51:43 +0200
- Cc: zzapper <david@xxxxxxxxxx>
- 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=0o2PBIZmZG7+ZVxqVJw33QP8Az2okZSZ4ix5FO6O3HE=; b=GWcfpvcmERs65Xr6wh/LrccsEQg2XD7qNYIo3rGxb5wd+U1qfTHlZkqOQBDZnA2PwP 8mydvTfs/8vw1S7EVm+sbQt6LS4spn2WMMk5xD+soMBjDgIS0uzlcWlchXtP4rNv3NKJ VAe+F7fn/+jQ79PzdPiMgcAEIi/mQ5oq/haHo=
- 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=vJfB8aRpSr1DjSzHtD3sbPdwXCDUyl0GWw8Ot/bwmUdWO3CznE4FETjK+AAKFHcvHj wcqzdiO0gW/8D6GBrA+mwXrHNSfB9FYcW8poom08EmIU3OJxvGqY2AT2DoaXIBDddQc2 VwxovMaoHSrsdqyJ9Qx98rVAuGiHQEAun0ODk=
- In-reply-to: <BANLkTimegXA4_5Co4sSWKgOmY_U-EWE6Pg@mail.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: <Xns9EBD94C46B8C1zzappergmailcom@80.91.229.10> <BANLkTimegXA4_5Co4sSWKgOmY_U-EWE6Pg@mail.gmail.com>
2011/4/4 Jérémie Roquet <arkanosis@xxxxxxxxx>:
> 2011/4/4 zzapper <david@xxxxxxxxxx>:
>> somevar=$(pwd)
>>
>> but I want somevar to be a variable name
>
> $ eval "$somevar=$(pwd)"
Actually, the quotes aren't even needed:
$ eval $somevar=$(pwd)
--
Jérémie
Messages sorted by:
Reverse Date,
Date,
Thread,
Author