« Return to Thread: bash doubt

Re: bash doubt

by Javier Barroso-3 :: Rate this Message:

Reply to Author | View in Thread



On Thu, May 15, 2008 at 2:58 AM, L. V. Gandhi <lvgandhi@...> wrote:

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.
Hi,
which is the "temp" file content ?

why are you using $i loop? , trv doesn't change inside it ...



 « Return to Thread: bash doubt

LightInTheBox - Buy quality products at wholesale price