Difference between revisions of "Paste"

From wikieduonline
Jump to navigation Jump to search
(Created page with "Merge every two lines: <code>cat /path/tofile.txt | paste -d " " - -</code> == See also == * {{cat}}")
 
Tags: Mobile web edit, Mobile edit
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Merge every two lines: <code>cat /path/tofile.txt | paste -d " "  - -</code>
+
{{lowercase}}
 +
[[Merge]] every two [[lines]]:
 +
{{merge every two lines}}
  
 +
 +
 +
 +
== Related commands ==
 +
* <code>[[join (command)|join]]</code>
  
  
 
== See also ==
 
== See also ==
 
* {{cat}}
 
* {{cat}}
 +
* {{vi}}
 +
 +
[[Category:Linux commands]]

Latest revision as of 06:05, 16 March 2023

Merge every two lines:

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



Related commands[edit]


See also[edit]

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