From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12522 invoked by alias); 4 Apr 2011 14:34:14 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15925 Received: (qmail 12997 invoked from network); 4 Apr 2011 14:34:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.215.43 as permitted sender) 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=j6CvPDLIyNQ3mqv4eYi70e+KNgVjxR6tqaecslzjgnk=; b=xczSXBA3iNoIO/6HhUJlJjqIMQXAHgf1dcBZ2PCwa28heHDCeys+xRHzKu058N1XL7 8YA9k3ev8aM+GERFzB5lmCAVObt1cy/9UTlCRlA2kTVYSUewgZ7pNjsFSfsP6W7d0JJf RyAvH9r+Lo+LTvXa69EjMWLRljGMuN4Cy2JA8= 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=AkQJ9eH4kRg0MoDRSw9GAX+LuBoHKR8cPqqQE7NY1Av63mNKWVxCXmO1tWwF3LCwQW EpqdpbM7NID0J76hwgV7th31/QhRiqPz7WENsLT0zGLsQb6I9YTrn2OgVy1vjwHkkGMS NSI7it9L92F4meZerqK2aMHhVln1NcWnGKaVQ= MIME-Version: 1.0 In-Reply-To: <20110404140651.GA9371@yahoo.fr> References: <20110404140651.GA9371@yahoo.fr> From: =?UTF-8?B?SsOpcsOpbWllIFJvcXVldA==?= Date: Mon, 4 Apr 2011 16:33:48 +0200 Message-ID: Subject: Re: is variable with variable name possible? To: Zsh Users Cc: Stephane Chazelas , zzapper Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2011/4/4 Stephane Chazelas : > 2011-04-04 15:48:32 +0200, J=C3=A9r=C3=A9mie Roquet: > [...] >> 2011/4/4 zzapper : >> > somevar=3D$(pwd) >> > >> > but I want somevar to be a variable name >> >> $ eval "$somevar=3D$(pwd)" > [...] > > No! > > eval "$somevar=3D\$(pwd)" > or > eval "$somevar=3D\$PWD" > > > Or think of what would happen if $PWD was "/tmp/x;rm -rf /home" Oh, right! --=20 J=C3=A9r=C3=A9mie