Apr 292009
Convert spaces into new lines using sed
Answer:
If you have a text file like:
1 2 3 4 5
How to convert the spaces into new lines?
Use sed!
# sed 's/ /\n/g' text.txt
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Convert spaces into new lines using sed
Answer:
If you have a text file like:
1 2 3 4 5
How to convert the spaces into new lines?
Use sed!
# sed 's/ /\n/g' text.txt