I put together this one-line font that prints all the words in a file on different lines: sed -e 's / [^ a-zA-Z] / \ n / g' test_input | grep -v "^ $"
If test_input contains “My bike is fast and clean,” a single-layer output would be:
My
bike
is
fast
and
clean
Now I need another version that prints all words from 2 words in the text, like this (even with Bash):
My bike
bike
fast | quick and fast and clean
Do you know how to do this?
source
share