Re: Help - a question on Unix/Linux script
From: Måns Rullgård (mru_at_kth.se)
Date: 02/25/04
- Next message: Jens.Toerring_at_physik.fu-berlin.de: "Re: Help - a question on Unix/Linux script"
- Previous message: Fletcher Glenn: "Re: pstack help"
- In reply to: L: "Help - a question on Unix/Linux script"
- Next in thread: Jens.Toerring_at_physik.fu-berlin.de: "Re: Help - a question on Unix/Linux script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 25 Feb 2004 18:21:32 +0100
"L" <L_X2828@yahoo.com> writes:
> Hi,
>
> This is a newbi question on Unix/Linux script. Your help would be
> appreciated.
>
> I need to run a utility (#./my_util -p some_value) for 10 times, and each
> time a different value increased by 1 needs to be passed to the utility.
>
> The simple script to run my_util 10 times with the same parameter (-p 100)
> may look like this:
>
> for 1 2 3 4 5 6 7 8 9 10
> do
> ./my_util -p 100
> done
>
> The question is how I can use a different value (from 100 to 109) for each
> instance of my_util in the script?
for i in 100 101 102 ...
do
./my_util -p $i
done
-- Måns Rullgård mru@kth.se
- Next message: Jens.Toerring_at_physik.fu-berlin.de: "Re: Help - a question on Unix/Linux script"
- Previous message: Fletcher Glenn: "Re: pstack help"
- In reply to: L: "Help - a question on Unix/Linux script"
- Next in thread: Jens.Toerring_at_physik.fu-berlin.de: "Re: Help - a question on Unix/Linux script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]