Difference between revisions of "Paste"

From wikieduonline
Jump to navigation Jump to search
Line 3: Line 3:
 
* <code>cat /path/tofile.txt | xargs -n2 -d'\n'</code>
 
* <code>cat /path/tofile.txt | xargs -n2 -d'\n'</code>
  
 +
 +
== Related commands ==
 +
* <code>[[join (command)|join]]</code>
  
  

Revision as of 13:32, 28 April 2020

Merge every two lines:

  • cat /path/tofile.txt | paste -d " " - -[1]
  • cat /path/tofile.txt | xargs -n2 -d'\n'


Related commands


See also

  • https://stackoverflow.com/a/9605450
  • Advertising: