I suspect your input file is in DOS format. This means that at the end of the line there are two characters: 'carriage return (CR)' and 'linefeed (LF)'. With your sed statement you are only replacing the LF by '***' plus a new LF. so your sentence becomes:
Which get printed as:
This is why
does indeed work because then you delete the CR (the "." takes care of it) , so your sentence becomes:
So I think you should convert the file to unix format first and then the original sed statement should work.
Last edited by Scrutinizer; 04-28-2010 at 05:23 AM..
I suspect your input file is in DOS format. This means that at the end of the line there are two characters: 'carriage return (CR)' and 'linefeed (LF)'. With your sed statement you are only replacing the LF by '***' plus a new LF. so your sentence becomes:
Which get printed as:
This is why
does indeed work because then you delete the CR (the "." takes care of it) , so your sentence becomes:
So I think you should convert the file to unix format first and then the original sed statement should work.
Right on the money. That was exactly the problem. I simply copied the contents of the file, created a new one in emacs and pasted it in there, and then renamed it to the original. Then all of a sudden it started to work. Thanks.
There are things you know, and things you know you don't know, and then there's things you don't know you don't know. That was something I didn't know I didn't know. God that was frustrating. To know your code is correct, but then it doesn't work is probably one of the worst part of this profession.
gede is a graphical debugger, a front-end for good ole uncle gdb. gede doesn't need a specialized gdb version. :b:
Unfortunately its a qt app, nevertheless it fits well in a gtk desktop environment.:eek:
Its author Johan Henriksson is a smart and nice guy always open for bug reports and... (2 Replies)
hi All
I use tomcat server to publish war file. How to send an notification to users via the application screen and it should dismiss once user clicks X mark.
Any suggestions ? (0 Replies)
Hi ,
I have the below ouput,
=====gopi=====
assasassaa
adsadsadsdsada
asdsadsadasdsa
sadasdsadsd
=====kannan===
asdasdasd
sadasddsaasd
adasdd
=====hbk===
asasasssa
....
..
I want the output like as below, not able paste here correctly. (2 Replies)
Hi guys ,
I want to develop a web page which is capable of executing the command on os and show the output on the browser.(Which involves reading and writing too.)
I m using jsp language to develop the web page. How would i use it to communicate with my linux server?
Any... (3 Replies)
Hi
consider this as the first line
00010015 MORGAN STANLEY & CO INCORPORATED N 110 INVESTAR 1 0001OT NJ 201-830-5055 01-Jan-1974 00:00:00 1 01-May-2008 00:00:00 05-Jun-2008 13:34:18 0001 - From SMSRun1_GIDQA02
Consider this as the second line
00010015 MORGAN STANLEY... (3 Replies)
Hi,
I have a txt file called a.txt which contain over 10,000 records and I would like to remove space before comma or after comma....like below:
The input (for example two record 00001,00002):
00001,client,card limited ,02292,N ,162:41 , 192, ... (6 Replies)
Hi,
I have created a tool which analyses and debugs cobol programs on Unix environment usin the C files. I now want to create a frontend for the tool in windows. For this i need to establish some kinda communication between the front the end and the back end. I know pipes in one way of... (0 Replies)
Hi,
I would like to develop a user interface on Solaris. Can anybody throw some light on currently available software utilities/ packages..?
Thanks in Advance ..
JS (4 Replies)