← Files & Text
Linux · Files & Text

How to cut, translate, and join text columns in Linux

Extract fields with cut, translate or delete characters with tr, and join files side by side with paste.


Lightweight text tools: cut pulls out columns, tr transforms characters, paste joins files column-wise.

# Cut fields 1 and 3 (colon-separated)
cut -d: -f1,3 /etc/passwd

# Cut a character range
cut -c1-10 <file>

# Translate lowercase to uppercase
tr 'a-z' 'A-Z' < <file>

# Delete carriage returns (DOS to Unix)
tr -d '\r' < dosfile > unixfile

# Join two files side by side
paste file1 file2
Linuxcuttr