Hello every one here I have a problem. I have a file in which there is some data like this
- mango
- apple
- orange
- grapes
When I run the command
tr '\n' ' ' < file.txt
It works fine;
the output was:
mango apple orange grapes
but I have another file which has data like this
- 12029
- SIDRASHAHID
- 7(outof471)
but the above command is not working on it. Is the problem that the file has numerical data?
I have even tried sed but failed.
Can any one tell me if there is a way by which I can write this data into a single line?
Converting a comment into an answer since it seems to be accurate: