[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: doubt in using sed



On 3/10/07, Mathias Brodala <info@noctus.net> wrote:
Hello.

Please reply to the list.

L.V.Gandhi, 10.03.2007 05:24:
> In another similar one I have problem
>
> lvgandhi@lvgdell600m:~/stock/datafiles$ ls -l nse2/
> total 0
> lvgandhi@lvgdell600m :~/stock/datafiles$ ls -l 3IINFOTECH
> -rw-r--r-- 1 lvgandhi lvgandhi 23400 2007-03-09 15:47 3IINFOTECH
> lvgandhi@lvgdell600m:~/stock/datafiles$ sed -e "s/3IINFOTECH,//" 3IINFOTECH
> |less
> lvgandhi@lvgdell600m:~/stock/datafiles$ sed -e "s/3IINFOTECH,//" 3IINFOTECH
>> /home/lvgandhi/stock/datafile/nse2/3IINFOTECH
> bash: /home/lvgandhi/stock/datafile/nse2/3IINFOTECH: No such file or
> directory
> In sed -e "s/3IINFOTECH,//" 3IINFOTECH |less I could see the correct
> output.
> But when I redirect, as in next command I get error "bash:
> /home/lvgandhi/stock/datafile/nse2/3IINFOTECH: No such file or directory"
> Redirecting to a file in same folder works.
> ie sed -e "s/3IINFOTECH,//" 3IINFOTECH > temp works.
> Any explanation please

You forgot a 's': 'datafiles' vs. 'datafile'.


Regards, Mathias
Thanks.


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