Answers for "split string into lines"

0

split string into lines

Just use tr command for separating words output into separate lines:
tr -s '[[:punct:][:space:]]' '\n'
Example for
cat file.txt | tr -s '[[:punct:][:space:]]' '\n'
Posted by: Guest on October-22-2020

Browse Popular Code Answers by Language