order words beside each other
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
how can I re order words beside each other in two columns?
for example:
Mark 150 John 221 James 134 Sara 9873
I want it to be:
Mark 150
John 221
James 134
Sara 9873
thank you so much!
bash
New contributor
proton is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
3
down vote
favorite
how can I re order words beside each other in two columns?
for example:
Mark 150 John 221 James 134 Sara 9873
I want it to be:
Mark 150
John 221
James 134
Sara 9873
thank you so much!
bash
New contributor
proton is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Are the words in a file?
– Kusalananda
1 min ago
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
how can I re order words beside each other in two columns?
for example:
Mark 150 John 221 James 134 Sara 9873
I want it to be:
Mark 150
John 221
James 134
Sara 9873
thank you so much!
bash
New contributor
proton is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
how can I re order words beside each other in two columns?
for example:
Mark 150 John 221 James 134 Sara 9873
I want it to be:
Mark 150
John 221
James 134
Sara 9873
thank you so much!
bash
bash
New contributor
proton is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
proton is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
proton is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 14 mins ago
proton
161
161
New contributor
proton is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
proton is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
proton is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Are the words in a file?
– Kusalananda
1 min ago
add a comment |Â
Are the words in a file?
– Kusalananda
1 min ago
Are the words in a file?
– Kusalananda
1 min ago
Are the words in a file?
– Kusalananda
1 min ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
6
down vote
Do it this way:
echo 'Mark 150 John 221 James 134 Sara 9873' | xargs -n2
Mark 150
John 221
James 134
Sara 9873
-n max-args, --max-args=max-args
Use at most max-args arguments per command line.
1
Wow! very easy, I didn't think about thisxargs
functionality! thanks!
– proton
1 min ago
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
6
down vote
Do it this way:
echo 'Mark 150 John 221 James 134 Sara 9873' | xargs -n2
Mark 150
John 221
James 134
Sara 9873
-n max-args, --max-args=max-args
Use at most max-args arguments per command line.
1
Wow! very easy, I didn't think about thisxargs
functionality! thanks!
– proton
1 min ago
add a comment |Â
up vote
6
down vote
Do it this way:
echo 'Mark 150 John 221 James 134 Sara 9873' | xargs -n2
Mark 150
John 221
James 134
Sara 9873
-n max-args, --max-args=max-args
Use at most max-args arguments per command line.
1
Wow! very easy, I didn't think about thisxargs
functionality! thanks!
– proton
1 min ago
add a comment |Â
up vote
6
down vote
up vote
6
down vote
Do it this way:
echo 'Mark 150 John 221 James 134 Sara 9873' | xargs -n2
Mark 150
John 221
James 134
Sara 9873
-n max-args, --max-args=max-args
Use at most max-args arguments per command line.
Do it this way:
echo 'Mark 150 John 221 James 134 Sara 9873' | xargs -n2
Mark 150
John 221
James 134
Sara 9873
-n max-args, --max-args=max-args
Use at most max-args arguments per command line.
answered 12 mins ago
Goro
8,18354081
8,18354081
1
Wow! very easy, I didn't think about thisxargs
functionality! thanks!
– proton
1 min ago
add a comment |Â
1
Wow! very easy, I didn't think about thisxargs
functionality! thanks!
– proton
1 min ago
1
1
Wow! very easy, I didn't think about this
xargs
functionality! thanks!– proton
1 min ago
Wow! very easy, I didn't think about this
xargs
functionality! thanks!– proton
1 min ago
add a comment |Â
proton is a new contributor. Be nice, and check out our Code of Conduct.
Â
draft saved
draft discarded
proton is a new contributor. Be nice, and check out our Code of Conduct.
proton is a new contributor. Be nice, and check out our Code of Conduct.
proton is a new contributor. Be nice, and check out our Code of Conduct.
Â
draft saved
draft discarded
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474530%2forder-words-beside-each-other%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Are the words in a file?
– Kusalananda
1 min ago