Re: bash script error

2007-05-27 Thread Matus UHLAR - fantomas
On 23.05.07 10:27, Alex Samad wrote: > is it because you shell is running bash and in the script it says sh > otry changing /bin/sh to /bin/bash better simply change [[ ]] to [ ], since [[ ]] are bash builtins. See man test for more informations on what arguments you can use with [ ], but you sure

Re: bash script error

2007-05-22 Thread Alex Samad
is it because you shell is running bash and in the script it says sh otry changing /bin/sh to /bin/bash On Tue, May 22, 2007 at 01:55:40PM -0700, L.V.Gandhi wrote: > The following script works. > for line in $(cat temp.csv);do high52=$(echo $line|cut -d, -f4);high=$(echo > $line|cut -d, -f2);if [[

Re: bash script error

2007-05-22 Thread Ken Irving
On Tue, May 22, 2007 at 01:55:40PM -0700, L.V.Gandhi wrote: > The following script works. > for line in $(cat temp.csv);do high52=$(echo $line|cut -d, -f4);high=$(echo > $line|cut -d, -f2);if > [[ $high52 = $high ]]; then stock=$(echo $line|cut -d, -f1); echo $stock >> > highs;fi;done > But when

Re: bash script error

2007-05-22 Thread Tyler Smith
On 2007-05-22, L.V.Gandhi <[EMAIL PROTECTED]> wrote: (tidied up for clarity) ++ But when it is put in a script file, than command line as #!/bin/sh rm -f highs for line in $(cat temp.csv) do high52=$(echo $line|cut -d, -f4) high=$(echo $line|cu

bash script error

2007-05-22 Thread L . V . Gandhi
The following script works. for line in $(cat temp.csv);do high52=$(echo $line|cut -d, -f4);high=$(echo $line|cut -d, -f2);if [[ $high52 = $high ]]; then stock=$(echo $line|cut -d, -f1); echo $stock >> highs;fi;done But when it is put in a script file, than command line as #!/bin/sh rm -f highs fo