Question : split string into lines
Answered by : armando-flores
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'
Source : | Last Update : Thu, 29 Oct 20
Question : how to split each string of a line
Answered by : rakibul-sadik
String[] lines = myString.split(System.getProperty("line.separator"));
Source : https://stackoverflow.com/questions/1096621/read-string-line-by-line | Last Update : Thu, 28 Apr 22