On Wed, Dec 20, 2006 at 08:17:04PM +0800, Uwe Dippel wrote:
| Otto Moerbeek wrote:
|
| >(( .. )) is ksh specific.
|
| I know.
|
| > Put #!/bin/ksh in your scritp and you'll be fine.
|
| Have you tried it ? I did. It doesn't work.
It works. How are you running this test ?
[EMAIL PROTECTED] $ cat >
On Wed, 20 Dec 2006, Uwe Dippel wrote:
> Otto Moerbeek wrote:
>
> > (( .. )) is ksh specific.
>
> I know.
>
> > Put #!/bin/ksh in your scritp and you'll be fine.
>
> Have you tried it ? I did. It doesn't work.
Here it works. You must be doing something wrong.
-Otto
L. Ahmadi wrote:
If you want to use /bin/sh,
No I don't (and didn't).
But now I know my mistake:
I had put #!/bin/ksh for a good reason, but I did call it with
$ sh progname
That's rather me stupid, then !
Thanks everyone for answering,
Uwe
Otto Moerbeek wrote:
(( .. )) is ksh specific.
I know.
> Put #!/bin/ksh in your scritp and you'll be fine.
Have you tried it ? I did. It doesn't work.
Uwe
2006/12/20, Uwe Dippel <[EMAIL PROTECTED]>:
I needed some little script; and - as usual - tried it out by typing:
i=0
uplim=10
while [ $i -lt $uplim ]
do
((i=i+1))
echo $i
done
1
2
3
4
5
6
7
8
9
10
Hi,
This is a shell rewrite of jot(1). Try :
$ jot 10 1 10
Best Regard,
Bruno.
L. Ahmadi schrieb:
> Hi,
>
> If you want to use /bin/sh, it works well if you replace
>
> ((i=i+1)) by
> let i=i+1
Or use
I=$((I+1))
which works in sh/ksh/bash and should be pretty universal.
- Michael
Hi,
If you want to use /bin/sh, it works well if you replace
((i=i+1)) by
let i=i+1
L. Ahmadi
Uwe Dippel wrote:
I needed some little script; and - as usual - tried it out by typing:
i=0
uplim=10
while [ $i -lt $uplim ]
do
((i=i+1))
echo $i
done
1
2
3
4
5
6
7
8
9
10
So good, so
On Wednesday 20 December 2006 18:43, Uwe Dippel wrote:
> i=0
> uplim=10
> while [ $i -lt $uplim ]
> do
>((i=i+1))
>echo $i
> done
#!/bin/ksh
--
Warm regards,
Kevin Foo
Key fingerprint : 4B23 FC1C E50B 9693 CCDD 2A7D A048 E909 8924 9BDD
Public key : http://keyserver.linux.it/pks
On Wed, 20 Dec 2006, Uwe Dippel wrote:
> I needed some little script; and - as usual - tried it out by typing:
> i=0
> uplim=10
> while [ $i -lt $uplim ]
> do
>((i=i+1))
>echo $i
> done
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
>
> So good, so far.
> So I put the history into a fil
Uwe Dippel([EMAIL PROTECTED])@2006.12.20 18:43:35 +0800:
> I needed some little script; and - as usual - tried it out by typing:
> i=0
> uplim=10
> while [ $i -lt $uplim ]
> do
>((i=i+1))
>echo $i
> done
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
>
> So good, so far.
> So I put the hi
Uwe Dippel([EMAIL PROTECTED]) on 2006.12.20 18:43:35 +:
> I needed some little script; and - as usual - tried it out
> by typing:
^^!
> #!/bin/sh
^^!
> Question: What is missing in the loop ?
nothing, your shell ist ksh, not sh.
/B.
--
Sebastian Benoit <[EMAIL PROTECTED
11 matches
Mail list logo