use*_*669 3 unix linux bash shell awk
我在一行中有这个:
We were born in the earth beyond the land
Run Code Online (Sandbox Code Playgroud)
我希望它在3个单词行中,如下所示:
We were born
in the earth
beyond the land
Run Code Online (Sandbox Code Playgroud)
$ xargs -n3 < file
We were born
in the earth
beyond the land
$ egrep -o '\S+\s+\S+\s+\S+' file
We were born
in the earth
beyond the land
Run Code Online (Sandbox Code Playgroud)