From owner-freebsd-questions@FreeBSD.ORG Thu Oct 20 13:17:38 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FB8516A41F for ; Thu, 20 Oct 2005 13:17:38 +0000 (GMT) (envelope-from Emanuel.strobl@gmx.net) Received: from mail.gmx.net (pop.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id EDB6D43D62 for ; Thu, 20 Oct 2005 13:17:36 +0000 (GMT) (envelope-from Emanuel.strobl@gmx.net) Received: (qmail invoked by alias); 20 Oct 2005 13:17:35 -0000 Received: from flb.schmalzbauer.de (EHLO cale.flintsbach.schmalzbauer.de) [62.245.232.135] by mail.gmx.net (mp032) with SMTP; 20 Oct 2005 15:17:35 +0200 X-Authenticated: #301138 From: Emanuel Strobl To: freebsd-questions@freebsd.org Date: Thu, 20 Oct 2005 15:17:17 +0200 User-Agent: KMail/1.8.1 X-Birthday: Oct. 6th 1972 X-CelPhone: +49 (0) 173 9967781 X-Tel: +49 (0) 89 18947781 X-Country: Germany X-Address: Munich, 80686 X-OS: FreeBSD MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1362382.qEdR5EDavT"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200510201517.34489@harrymail> X-Y-GMX-Trusted: 0 Subject: (bourne)shell variable names containing a variable? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 13:17:38 -0000 --nextPart1362382.qEdR5EDavT Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, I try to assign a value to a variable, but the variable should consist of=20 another variable. Is this possible (in bourne shell)? Example: #!/bin/sh list=3D"one two three four" for item in $list; do ${item}_present=3Dyes done This doesn't work since the shell tries to execute "one_present=3Dyes"=20 instead of assigning yes to one_present.... What am I missing???? Thanks a lot, =2DHarry --nextPart1362382.qEdR5EDavT Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQBDV5juBylq0S4AzzwRAsA6AJ9HwngSeJzfUDJb3hErHDY+2UjwDQCfTyJu j1enWqlQygloijWwjx3edEQ= =UzFQ -----END PGP SIGNATURE----- --nextPart1362382.qEdR5EDavT--