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|cut -d, -f2) stock=$(echo $line|cut -d, -f1) if [[ $high52 = $high ]] then echo $stock > highs fi done I get error as /home/lvgandhi/bin/gethilo: 12: [[: not found Any suggestions please? +---------------------------------------------------+ It works for me. I'd check to see where /bin/sh is pointing - it's usually a symlink to /bin/bash, but maybe yours is pointed at something else. Assuming you just pasted the script into your post there are no typos... HTH, Tyler -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]