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
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 [[
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
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
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
5 matches
Mail list logo