otes4
1
Hi all,
For a intro UNIX course I'm taking, I need to use the command "tr" to display a file on standard output without any newlines (all on one line).
I assume I would start with "cat filename | tr" but don't know what to put after tr.
Any ideas would be lovely!
Thanks.
Tytalus
2
tr "\n" " " < filename
i.e. change newlines (\n) to spaces
HTH
tr -d '\n' < file
You need to read your text on tr. Plus, we do not want homework on the forums.
otes4
4
thanks!
no more homework, my bad.