SyntaxFix
Write A Post
Hire A Developer
Questions
Try:
tr -s ' ' <text.txt | cut -d ' ' -f4
From the tr man page:
tr
-s, --squeeze-repeats replace each input sequence of a repeated character that is listed in SET1 with a single occurrence of that character