From owner-freebsd-questions@FreeBSD.ORG Fri Jul 3 19:09:15 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC6F61065677 for ; Fri, 3 Jul 2009 19:09:15 +0000 (UTC) (envelope-from evuraan@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by mx1.freebsd.org (Postfix) with ESMTP id 71AE38FC12 for ; Fri, 3 Jul 2009 19:09:15 +0000 (UTC) (envelope-from evuraan@gmail.com) Received: by qw-out-2122.google.com with SMTP id 5so1088583qwd.7 for ; Fri, 03 Jul 2009 12:09:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=tRUGrvPwDlpEvoRvdG1s2blW83yQK9CQ7AnahxBp71k=; b=aOuZOLYEj0urGKVPFYBJbChop36K4MxA0+rLsBGxVy7rDUu+Gleo3QktbvVv9zmu8f K+wq6sFahZecDybVYWzWz7PC1X5RlUaI0eFvOBj+xXNFG6Ay8G/n6kVFqHZ5/80A1kbH EXUuvEcWusRwUZw9Evf8aV70WCzq+blsljsG8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=MgYQ/KL2Uzh+zEmNQmoSMriJaiSc9/rWSH830GqJ5vcXjtnNKbFGVE8lvnaGpb9fMO 1fxGZ9JvQI+Hk1AxLCXGog4PKcsK1qj7/W5LF3Y246ylgOfBg3pEED5i66BIyAE0bPDQ 45u/gixdGB3j9UzE9HSRR813oDx2RjOJNyAGo= MIME-Version: 1.0 Received: by 10.224.11.20 with SMTP id r20mr2200963qar.192.1246646590100; Fri, 03 Jul 2009 11:43:10 -0700 (PDT) In-Reply-To: <755cb9fc0907021119n26dee870t83ca3d1c9c5c3c90@mail.gmail.com> References: <755cb9fc0907011040o28b82cdbjd5760b139f797050@mail.gmail.com> <87tz1wqkmu.fsf@kobe.laptop> <87k52saz86.fsf@kobe.laptop> <755cb9fc0907021119n26dee870t83ca3d1c9c5c3c90@mail.gmail.com> Date: Fri, 3 Jul 2009 11:43:10 -0700 Message-ID: <6fbcd0710907031143k3c929404qbb4de33301046eef@mail.gmail.com> From: Evuraan To: Alexandre Vieira Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Giorgos Keramidas , Wojciech Puchar , freebsd-questions@freebsd.org Subject: Re: scripting tip needed 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: Fri, 03 Jul 2009 19:09:16 -0000 good thing you found the answer. I am glad you did, and oh, I am more glad that you found your solution on ksh itself and not on "advanced scripting language, like Perl or Python.'' > Guys, > > I eventually found it with lots of rtfm on variable substitution and such.. > > [ne@dada~]$ z=0 > [ne@dada~]$ y=1 > [ne@dada~]$ x=aaa > [ne@dada~]$ eval `echo MACHINE_DISK$z[$y]`=$x > [ne@dada~]$ echo $(eval echo \${MACHINE_DISK$z[$y]}) > aaa > [ne@dada~]$ > > Thanks anyway! > > > -- >