On 09/04/08 20:50, L.V.Gandhi wrote:
I have a script as follows #!/bin/bash rm -f ~/stock/flstock.csvgrep FUTSTK ~/stock/today/$1 |grep "25/09/2008"|cut -s -d, -f9|sort -nr > tempi=0 for trv in $(cat temp) do grep $trv ~/stock/today/$1 >> ~/stock/flstock.csv i=$((i+1)) if [ $i -eq 20 ] then exit 0 fidone rm -f tempcat ~/stock/flstock.csv |cut -s -d, -f2|sort >> ~/stock/fliquidstocks.txtLast line is not getting executed . But if I run last line afterwards in console, it works.Can someone throw somelight why it happens.
("temp" is a horribly generic name.) Add "set -x" to the top of your script, to see exactly what happens. -- Ron Johnson, Jr. Jefferson LA USA "Do not bite at the bait of pleasure till you know there is no hook beneath it." -- Thomas Jefferson