Difference between revisions of "Tr"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 
{{draft}}
 
{{draft}}
 +
{{lowercase}}
 +
[[wikipedia:tr]]
  
  

Revision as of 23:00, 30 November 2021

This article is a Draft. Help us to complete it.

wikipedia:tr


Concatenate lines on a file:

cat file | tr '\n' ' '

Concatenate/merge every 2 lines:

cat /path/tofile.txt | paste -d " "  - -[1]


cat file | tr '\n' 
tr: when not truncating set1, string2 must be non-empty

Related commands

See also

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