contents of file.txt:
abc def ghi
cat file.txt | tr ' ' '\012'
abc
def
ghi
I originally tried this with
cat file.txt | sed 's/ /\n/g'
and it didn't work. I am told that '\n' isn't always recognised as a newline
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment