diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-08-27 22:31:37 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-08-27 22:31:37 +0200 |
commit | f5178ed1e419cfae7679ae8b4d3130ef48abfbfd (patch) | |
tree | 2dce06a0ef852a456959555801590359d96fd8e5 /src/cli/paste.md | |
parent | fa9e907965d9bf86eb2aa840a3bd9982699ee54c (diff) | |
download | notes-f5178ed1e419cfae7679ae8b4d3130ef48abfbfd.tar.gz notes-f5178ed1e419cfae7679ae8b4d3130ef48abfbfd.zip |
cli: add tac, paste
Diffstat (limited to 'src/cli/paste.md')
-rw-r--r-- | src/cli/paste.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/cli/paste.md b/src/cli/paste.md new file mode 100644 index 0000000..114002c --- /dev/null +++ b/src/cli/paste.md @@ -0,0 +1,22 @@ +# paste(1) + +``` +# Concatenate input files linewise and join them by a TAB char. + +paste FILE [FILE] + -d CHAR delimiter to join each line +``` + +# Examples + +```sh +# Read two files. +paste <(echo -e 'a1\na2') <(echo -e 'b1\nb2') +a1 b1 +a2 b2 + +# Can read from stdin. +echo -e 'a1 a2\nb1 b2\nc1 c2\nd1 d2' | paste - - +# a1 a2 b1 b2 +# c1 c2 d1 d2 +``` |