Re: shell program help wanted!

2000-09-14 Thread Miquel van Smoorenburg
In article <[EMAIL PROTECTED]>, Adam Lazur <[EMAIL PROTECTED]> wrote: >I don't use $(( )) ever since I found $[ ] and got used to using $( ) >instead of ` ` Yes however $(( )) is Posix (posixized ksh-ism) and $[ ] is a bashism. $ ash $ echo $[2+3] $[2+3] $ echo $((2+3)) 5 Mike"ism". -- Deadloc

Re: shell program help wanted!

2000-09-14 Thread Adam Lazur
Emil Pedersen ([EMAIL PROTECTED]) said: > What about: > > i=$((i+1)) $[i+1] will also work I don't use $(( )) ever since I found $[ ] and got used to using $( ) instead of ` ` .adam -- [<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>] [ icq #3354423

Re: shell program help wanted!

2000-09-14 Thread Emil Pedersen
> > The following bash script worked for me: > > #/bin/bash > > i=0 > for file in `ls` > do > cp $file temp$i.gif > i=`expr $i + 1` ^^^ What about: i=$((i+1)) mentioned in "man bash" for aritmetic evaluations. I've never used the "expr" in scrip

Re: shell program help wanted!

2000-09-14 Thread Anthony David Fox
Nianwei Xing <[EMAIL PROTECTED]> writes: > Hi, debians: > I have a question about the shell program. The problem > is I have lots of files with long file name under on > directory and I want to changes the names of the files > to temp0, temp1.gif,temp2.gif,.tempN.gif,etc and I > wrote the foll