I want to split a file into chunks with 2 words each.
$cat tmp
word1 word2 word3 word4 word5 word6 word7
$sed -e 's/word. word. /&\n/g' tmp
word1 word2
word3 word4
word5 word6
word7
$sed -e 's/word. \{2\}/&\n/g' tmp
word1 word2 word3 word4 word5 word6 word7
I expected the last command to give same result as the one before it. What is wrong?