I'm currently using the following to split a file into words - Is there some quicker way?
while read -r line
do
for word in $line
do
words="${words}\n${word}"
done
done
What about using tr?
tr -s '[:space:]' '\n' < myfile.txt
The -s squeezes multiple whitespace characters into one.
xargs -n 1 echo <myfile.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With