From owner-freebsd-questions Mon Feb 4 8: 6:20 2002 Delivered-To: freebsd-questions@freebsd.org Received: from clientmail.ehsrealtime.com (eris.ehsrealtime.com [213.52.146.130]) by hub.freebsd.org (Postfix) with ESMTP id 3C77537B435 for ; Mon, 4 Feb 2002 08:06:14 -0800 (PST) Received: from set.ehsrealtime.com ([213.52.146.197]) by clientmail.ehsrealtime.com with esmtp (Exim 3.33 #2) id 16XlGX-0009Lc-01; Mon, 04 Feb 2002 15:42:45 +0000 Received: from waynep by set.ehsrealtime.com with local (Exim 3.34 #3) id 16XldY-0000OY-00; Mon, 04 Feb 2002 16:06:32 +0000 From: Wayne Pascoe To: Ceri Cc: questions@FreeBSD.org Subject: Re: Stupid sh(1) question References: <20020204154923.GA4312@rhadamanth> Date: 04 Feb 2002 16:06:32 +0000 In-Reply-To: <20020204154923.GA4312@rhadamanth> Message-ID: Lines: 35 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.5 (bamboo) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Ceri writes: > Not directly FreeBSD related, but a good one for Annelise's Linux->FreeBSD > question archive. > > I have a bash script that I wrote that does this : > > SERVERS[0]="ns1.example.net" > SERVERS[1]="doppler.example.net" > [..] > SERVERS[x]="mail.example.net" > > and then later : > for i in ${SERVERS[@]} > do > stuff > done | ${MAILCMD} -s "${SUBJECT}" ${RECIPIENT} I would do something like the following SERVERS="ns1.example.net doppler.example.net mail.example.net" for i in $SERVERS; do echo $i; done Just separate each value with a space. Hope that helps some ? -- - Wayne Pascoe | The time for action is passed. freebsd@molemanarmy.com | Now is the time for senseless http://www.molemanarmy.com | bickering. | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message