Text Processing

paste

Merges lines from files side by side.

paste combines corresponding lines, often for quick column creation.

Syntax
paste [options] file1 file2

Arguments explained

  • Options adjust output or behavior.
  • Arguments name the files, services, hosts, or values the command should work with.

Common examples

Combine columns
paste names.txt scores.txt

Prints matching lines from both files on one line.

Choose delimiter
paste -d, names.txt scores.txt

Uses commas between pasted fields.

paste Command
FieldDetails
Commandpaste
CategoryText Processing
Primary useMerges lines from files side by side.
Syntaxpaste [options] file1 file2