Bash Word splitting Splitting by separator changes


Example

We can just do simple replacement of separators from space to new line, as following example.

echo $sentence | tr " " "\n"

It'll split the value of the variable sentence and show it line by line respectively.