Re: simple bash loop problem ...

2003-06-30 Thread David selby
Jonathan Matthews wrote: On Sat, Jun 28, 2003 at 03:03:27PM +0100, David selby wrote: Hello, I am writing bash a bash sed script, it has been going suprisingly well. I need a loop to count 9 times the variable n to the count .. [snip] for N in 1 2 3 4 5 6 7 8 9 do echo $N done I'm

Re: simple bash loop problem ...

2003-06-30 Thread Shawn Lamson
On Sat, June 28 at 3:03 PM EDT David selby [EMAIL PROTECTED] wrote: Hello, I am writing bash a bash sed script, it has been going suprisingly well. I need a loop to count 9 times the variable n to the count .. for n=1 to 9 next kind of thing, but this is not BASIC !! My

Re: simple bash loop problem ...

2003-06-30 Thread Shaun ONeil
On Sat, 2003-06-28 at 10:03, David selby wrote: Hello, I am writing bash a bash sed script, it has been going suprisingly well. I need a loop to count 9 times the variable n to the count .. for n=1 to 9 next kind of thing, but this is not BASIC !! My best guess is

Re: simple bash loop problem ...

2003-06-30 Thread Marcelo Ramos
El(On) 28/06/2003 (15:03:27), David selby escribió(wrote): Hello, I am writing bash a bash sed script, it has been going suprisingly well. I need a loop to count 9 times the variable n to the count .. for n=1 to 9 next kind of thing, but this is not BASIC !! My best guess

Re: simple bash loop problem ...

2003-06-30 Thread Hugh Saunders
On Sat, Jun 28, 2003 at 03:03:27PM +0100, David selby wrote: Hello, I am writing bash a bash sed script, it has been going suprisingly well. I need a loop to count 9 times the variable n to the count .. for n=1 to 9 next [EMAIL PROTECTED]:~$ cat ./bashtest #!/bin/bash i=0 while

RE: simple bash loop problem ...

2003-06-30 Thread Joyce, Matthew
To: Debian list Subject: simple bash loop problem ... Hello, I am writing bash a bash sed script, it has been going suprisingly well. I need a loop to count 9 times the variable n to the count .. for n=1 to 9 next kind of thing, but this is not BASIC !! My best guess

Re: simple bash loop problem ...

2003-06-30 Thread Nick Hastings
* David selby [EMAIL PROTECTED] [030629 18:42]: Hello, I am writing bash a bash sed script, it has been going suprisingly well. I need a loop to count 9 times the variable n to the count .. for n=1 to 9 next kind of thing, but this is not BASIC !! My best guess is

Re: simple bash loop problem ...

2003-06-30 Thread Todd Pytel
How about for N in `seq 1 9` do...? --Todd On Sun, 29 Jun 2003 09:55:00 + Jonathan Matthews [EMAIL PROTECTED] wrote: On Sat, Jun 28, 2003 at 03:03:27PM +0100, David selby wrote: Hello, I am writing bash a bash sed script, it has been going suprisingly well. I need a loop to

Re: simple bash loop problem ...

2003-06-30 Thread Sebastian Kapfer
On Mon, 30 Jun 2003 05:30:14 +0200, Sebastian Kapfer wrote: n=1 while [ $n \ 9 ]; do echo $n n=$((n+=1)) done Note the backslash. Plain is for redirection. Interesting to see that I never ran into this thing, because I'm used to != from C++ :-) Of course \ is still wrong,

Re: simple bash loop problem ...

2003-06-30 Thread David selby
David selby wrote: Hello, I am writing bash a bash sed script, it has been going suprisingly well. I need a loop to count 9 times the variable n to the count .. for n=1 to 9 next kind of thing, but this is not BASIC !! My best guess is declare -i n=1 while [ $n 9 ]; do .

simple bash loop problem ...

2003-06-29 Thread David selby
Hello, I am writing bash a bash sed script, it has been going suprisingly well. I need a loop to count 9 times the variable n to the count .. for n=1 to 9 next kind of thing, but this is not BASIC !! My best guess is declare -i n=1 while [ $n 9 ]; do . n=$((n+=1)) done All i get

Re: simple bash loop problem ...

2003-06-29 Thread Jonathan Matthews
On Sat, Jun 28, 2003 at 03:03:27PM +0100, David selby wrote: Hello, I am writing bash a bash sed script, it has been going suprisingly well. I need a loop to count 9 times the variable n to the count .. [snip] for N in 1 2 3 4 5 6 7 8 9 do echo $N done I'm sure someone will point out a

Re: simple bash loop problem ...

2003-06-29 Thread Russell Shaw
David selby wrote: Hello, I am writing bash a bash sed script, it has been going suprisingly well. I need a loop to count 9 times the variable n to the count .. for n=1 to 9 next kind of thing, but this is not BASIC !! My best guess is declare -i n=1 while [ $n 9 ]; do .

Re: simple bash loop problem ...

2003-06-29 Thread Seneca
On Sat, Jun 28, 2003 at 03:03:27PM +0100, David selby wrote: I am writing bash a bash sed script, it has been going suprisingly well. I need a loop to count 9 times the variable n to the count .. [...] My best guess is declare -i n=1 while [ $n 9 ]; do . n=$((n+=1)) done All

Re: simple bash loop problem ...

2003-06-29 Thread Sebastian Kapfer
On Sun, 29 Jun 2003 11:50:06 +0200, David selby wrote: Hello, I am writing bash a bash sed script, it has been going suprisingly well. I need a loop to count 9 times the variable n to the count .. [...] kind of thing, but this is not BASIC !! ... and honestly, I'm glad it isn't BASIC

Re: simple bash loop problem ...

2003-06-29 Thread Martin Fritsche
David selby schrieb: PS is there a more ellagent way to do a counted loop as well as a way that works ? This should do it: for ((n=1; n 9; n++)) do ... done Maddin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]

Re: simple bash loop problem ...

2003-06-29 Thread Matthias Hentges
Am Sam, 2003-06-28 um 16.03 schrieb David selby: Hello, I am writing bash a bash sed script, it has been going suprisingly well. I need a loop to count 9 times the variable n to the count .. for n=1 to 9 next kind of thing, but this is not BASIC !! My best guess is

Re: simple bash loop problem ...

2003-06-29 Thread Colin Watson
On Sat, Jun 28, 2003 at 03:03:27PM +0100, David selby wrote: I am writing bash a bash sed script, it has been going suprisingly well. I need a loop to count 9 times the variable n to the count .. for n=1 to 9 next for n in $(seq 1 9); do ... done kind of thing, but this