On Wed, May 14, 2008 at 8:54 AM, Todd A. Jacobs <[EMAIL PROTECTED]> wrote:
> On Wed, May 14, 2008 at 06:21:07AM +0530, L.V.Gandhi wrote:
>
>>                 i=$i+1
>
> This syntax is broken. Any of these alternatives will work:
>
>    - let i=$i+1
>    - let i+=1
>    - i=$(( i + 1 ))
>
> Basically, you need to let bash know that $i is an integer, and not a
> string.
>
Now I changed this to
rm -f ~/lstock
i=0
for trv in $(cat temp)
do
        while [ $i -ne 20 ]
        do
                i=$[i+1]
                grep $trv stock/nsedata/2008/05/20080512.txt >> lstock
        done
done    
I get lstock only 0 byte file.
Where am I wrong

-- 
L.V.Gandhi
http://lvgandhi.tripod.com/
linux user No.205042


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to