raju4u
November 14, 2012, 10:53pm
1
Hi All,
My Input is:
111.121 23212121
121.231 12678878
My output should be
111.12123212121
121.23112678878
in each row i need to replace that perticular space with empty.
8th position in the file for all rows.
Please help me in this case ..
Thanks
agama
November 14, 2012, 11:04pm
2
Try:
sed 's/ //' input-file >output-file
raju4u
November 14, 2012, 11:21pm
3
Thank you very much for u r reply,but here i need to replace perticular position with empty for all rows in the file.
Your code is not working according to my requirment,
Pls help me in this regard...
raju4u:
Thank you very much for u r reply,but here i need to replace perticular position with empty for all rows in the file.
Your code is not working according to my requirment,
Pls help me in this regard...
post some more examples. Agama solution will work for the posted example.
Yoda
November 14, 2012, 11:46pm
5
Refer thread . I hope this helps.
---------- Post updated at 22:46 ---------- Previous update was at 22:42 ----------
Solution provided by balajesuri
sed 's/.//8' input_file
raju4u
November 14, 2012, 11:57pm
6
Hi
111.121 23212121
121.231 12678878
112.231 12611117
In the above file 8th position is space and i need to replace with empty for that position for all rows.
Outpur should be like this:
111.12123212121
121.23112678878
112.23112611117
$ sed 's/.//8' a.txt
111.12123212121
121.23112678878
112.23112611117