Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ paste(1) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cut(1)

grep(1)

pr(1)




paste(1) paste(1)
NAME paste - merges lines of several files or subsequent lines of one file SYNOPSIS paste file1 file2 ... paste -dlist file1 file2 ... paste -s [-dlist] file1 file2 ... ARGUMENTS file1 file2 Specifies the first (file1) and second (file2) input files. If - is used in place of any filename, a line is read from the standard input. (There is no prompting.) -dlist Replaces the newline characters of each but the last file (or last line in case of the -s option) with a tab character, without this option. This option allows replacing the tab character by one or more alternate characters (see below). Replace list with one or more characters immediately following -d. Replace the default tab as the line concatenation character. The list is used circularly, that is, when exhausted, it is reused. In parallel merging (i.e., no -s option), the lines from the last file are always terminated with a newline character, not from the list. The list may contain the special escape sequences: \n (newline) \t (tab), \\ (backslash), and \0 (empty string, not a null character). Quoting may be necessary, if characters have special meaning to the shell (e.g., to get one backslash, use -d \\\\"" ). -s Merges subsequent lines rather than one from each input file. Use tab, for concatenation, unless a list is specified with -d option. Regardless of the list, the very last character of the file is forced to be a newline. DESCRIPTION In the first two forms, paste concatenates corresponding lines of the given input files file1, file2, etc. It treats each file as a column or columns of a table and pastes them together horizontally (parallel merging). If you will, it is the counterpart of cat(1), which concatenates vertically, i.e., one file after the other. In the last form above, paste replaces the function of an older command with the same name by combining subsequent lines of the input file (serial merging). In all cases, lines are glued together with the tab character, or with characters from an January 1992 1



paste(1) paste(1)
optionally specified list. Output is to the standard output, so it can be used as the start of a pipe, or as a filter, if - is used in place of a filename. EXAMPLES The command: ls | paste -d"" - lists directories in one column. The command: ls | paste - - - - lists directories in four columns. The command: paste -s -d"\ t\ n" file combines pairs of lines into lines. STATUS MESSAGES AND VALUES line too long Output lines are restricted to 511 characters. too many files Except for -s option, no more than 12 input files may be specified. FILES /usr/bin/paste Executable file SEE ALSO cut(1), grep(1), pr(1) 2 January 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026