From owner-freebsd-questions@FreeBSD.ORG Wed Oct 13 20:26:14 2004 Return-Path: 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 12A2A16A4CF for ; Wed, 13 Oct 2004 20:26:14 +0000 (GMT) Received: from post-23.mail.nl.demon.net (post-23.mail.nl.demon.net [194.159.73.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F7FD43D48 for ; Wed, 13 Oct 2004 20:26:13 +0000 (GMT) (envelope-from FreeBSD@amadeus.demon.nl) Received: from amadeus.demon.nl ([82.161.18.200]:59956 helo=[10.0.1.1]) by post-23.mail.nl.demon.net with esmtp (Exim 4.34) id 1CHphM-000GBI-C4 for questions@freebsd.org; Wed, 13 Oct 2004 20:26:12 +0000 Mime-Version: 1.0 (Apple Message framework v619) Content-Transfer-Encoding: 7bit Message-Id: <1E30D9F8-1D56-11D9-B5AA-0003939726F0@amadeus.demon.nl> Content-Type: text/plain; charset=US-ASCII; format=flowed To: questions@freebsd.org From: FreeBSD questions mailing list Date: Wed, 13 Oct 2004 22:26:09 +0200 X-Mailer: Apple Mail (2.619) Subject: Increasing variable# X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Oct 2004 20:26:14 -0000 Hi I need some help with this script I'm trying to write. This is what I have: #!/bin/sh Max=4 Count=1 until [ $Count -gt $Max ] do A$Count=" `...something...`" Count=$(($Count+1)) done exit 0 I want to put the result of "something" in a serie of variables with an increasing number in it's name: A1=result_of_something A2=result_of_something A3=result_of_something A4=... etc. until $Count > $Max I don't know how to create such a variables serie, well, at least the example isn't working because the syntax A$Count generates an error and I have no idea what it should be. I don't know how to search for such a topic... Can anyone tell me how this should be handled? thanks in advance, Arno