cmdxray / commands / paste

What does paste do?

merge lines of files side by side, separated by tabs.

▸ Explain your own paste command →

paste examples, explained

$ paste a.txt b.txt

  • pastemerge lines of files side by side, separated by tabs
  • a.txtan argument passed to the command
  • b.txtan argument passed to the command

$ paste -d, cols1 cols2

  • pastemerge lines of files side by side, separated by tabs
  • -d,use these characters instead of tab to separate columns
  • cols1an argument passed to the command
  • cols2an argument passed to the command

$ paste -s -d, list.txt

  • pastemerge lines of files side by side, separated by tabs
  • -spaste one file at a time — its lines onto a single row
  • -d,use these characters instead of tab to separate columns
  • list.txtan argument passed to the command

paste flags & options

-duse these characters instead of tab to separate columns
-spaste one file at a time — its lines onto a single row
-ztreat input and output lines as NUL-terminated
--delimitersuse these characters instead of tab to separate columns
--serialpaste one file at a time onto a single row

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.