Answer the question
In order to leave comments, you need to log in
Every two words in the line are regular expressions and unix. How?
Please help me write a regular expression that selects every two words and uses the sed command to move them to the next line.
I wrote an example for one word, of course I understand that this is a kindergarten, I just haven’t come across them yet.
\n will be inserted after each word followed by a space. Thus, when displayed, it will be on the next line.sed 's/ /\n/g' mytext.txt
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question