Re: arithmetic evaluation (may be error) ?

2007-12-29 Thread Bob Proulx
Roman Rumisek wrote: > $ echo $(("096" & 4)) > bash: "096" & 4: syntax error: operand expected (error token is ""096" & 4") > $ echo $((0096 & 4)) > bash: 0096: value too great for base (error token is "0096") In both of those the 9 is not a valid octal component. You are running into octal conve

arithmetic evaluation (may be error) ?

2007-12-29 Thread Roman Rumisek
Hi, I am using bash: BASH_VERSION='3.2.17(2)-release' and i test arithmetic evaluation with this results: $ echo $((296 & 4)) 0 $ echo $((4 & 4)) 4 $ echo $((04 & 4)) 4 $ echo $((004 & 4)) 4 $ echo $((0004 & 4)) 4 $ echo $(("096" & 4)) bash: "096" & 4: syntax error: operand expected (error token

Re: bash vs sh / ticks appearing

2007-12-29 Thread Tuc at T-B-O-H.NET
> > "Tuc at T-B-O-H.NET" <[EMAIL PROTECTED]> writes: > > > When I brought it over to Linux using bash its doing > > some strange stuff... > > > > SCRIPT: > > > > #!/bin/sh -x > > > > SCRIPT=$1 > > shift > > EMAIL=$1 > > > > echo $SCRIPT > > $SCRIPT 1>/tmp/mailifoutput.$$ 2>&1 > > If you want

Re: bash vs sh / ticks appearing

2007-12-29 Thread Andreas Schwab
"Tuc at T-B-O-H.NET" <[EMAIL PROTECTED]> writes: > When I brought it over to Linux using bash its doing > some strange stuff... > > SCRIPT: > > #!/bin/sh -x > > SCRIPT=$1 > shift > EMAIL=$1 > > echo $SCRIPT > $SCRIPT 1>/tmp/mailifoutput.$$ 2>&1 If you want the shell to reinterpret meta char

bash vs sh / ticks appearing

2007-12-29 Thread Tuc at T-B-O-H.NET
Hi, I normally run a program on FreeBSD using its sh, and it runs fine. When I brought it over to Linux using bash its doing some strange stuff... SCRIPT: #!/bin/sh -x SCRIPT=$1 shift EMAIL=$1 echo $SCRIPT $SCRIPT 1>/tmp/mailifoutput.$$ 2>&1 sh/FreeBSD output: # ./script