Hello Guys,
I was performing text file reading and writting operations and the job looked very simple as usual, yet it has not been solved successfully.
We have got a simple text file final.txt which contains data like this:-
05/18/2012 02:12:66 8HRY hjhruehr737243 YES NO u34gewryge 698 i.e each value separated by ** a space** in between.
We want the output file to be written by replacing space with pipe line character '|' with condition that the the space in time stamp value at the start (05/18/2012 02:12:66) should be retained. so output will look like this
05/18/2012 02:12:66|8HRY|hjhruehr|737243|YES|NO|u34gewryge|698
With my code I'm able to produce the output as given below:
05/18/2012
02:12:66|8HRY|hjhruehr|737243|YES|NO|u34gewryge|698
Now, this is my problem. I want every thing to be written in a single line but whichever method I implement to write file gives me such output.
My code is pasted ; can anyone guide me on this? Thanks in advance.