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
.
n=$((n
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 stil
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 n
* 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 gue
Google for 'bash loops'
http://www.google.com.au/search?q=bash+loops&ie=UTF-8&oe=UTF-8&hl=en&meta=
the first link is
http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-7.html
Matt
--
> -Original Message-
> From: David selby [mailto:[EMAIL PROTECTED]
> Sent: Sunday, 29 June 2003 7:15
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
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
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
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 BAS
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 s
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, bu
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 gues
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]
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 BA
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))
> d
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
.
n=$((n+
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 o
17 matches
Mail list logo