morpheus-base

morpheus base system
git clone git://git.2f30.org/morpheus-base
Log | Files | Refs

paste.1 (3214B)


      1 .TH PASTE 1 paste-VERSION "Apr 2013"
      2 .SH NAME
      3 paste \- merge corresponding or subsequent lines of files
      4 .SH "SYNOPSIS"
      5 .PP
      6 .B paste
      7 [
      8 .B \-s
      9 ]
     10 [
     11 .B \-d
     12 .I list
     13 ]
     14 .I file...
     15 .SH DESCRIPTION
     16 The
     17 .B paste
     18 utility concatenates the corresponding lines of the given input files,
     19 and writes the resulting lines to standard output. The default operation
     20 of
     21 .B paste
     22 concatenates the corresponding  lines of the input files.
     23 The newline of every line except the line  from the last input file is
     24 replaced with a tab.
     25 If an end-of-file condition is detected on one or more input files,
     26 but not all input files,
     27 .B paste
     28 behaves as though empty lines were read from the files on which
     29 end-of-file was detected, unless the
     30 .B \-s
     31 option is specified.
     32 .SH OPTIONS
     33 .TP
     34 .B \-d list
     35 unless a backslash character appears in
     36 .I list
     37 each character is an element specifying a delimiter.
     38 If a backslash character appears, that and one or more characters
     39 following it are an element specifying a delimiter.
     40 These elements specify one or more characters to use,
     41 instead of the default tab, to replace the newline of the input
     42 lines. The elements in
     43 .I list
     44 are used circularly; that is, when the
     45 .I list
     46 is exhausted the first element from the list is reused.
     47 When the
     48 .B \-s
     49 option is specified, the last newline in a file is not be modified.
     50 The delimiter is reset to the first element of list after each file
     51 operand is processed.
     52 If a backslash character appears in list, it and the character following
     53 it represents the following delimiters:
     54 .RS
     55 .TP
     56 .I \en
     57 newline character
     58 .TP
     59 .I \et
     60 tab character
     61 .TP
     62 .I \e\e
     63 backslash character
     64 .TP
     65 .I \e0
     66 empty string (not a null character)
     67 .TP
     68 If Any other characters follow the backslash, results are unspecified.
     69 .RE
     70 .TP
     71 .B \-s
     72 concatenate all of the lines of each separate input file in command line
     73 order. The newline of every line except the last line in each input file
     74 are replaced with the tab, unless otherwise specified by the
     75 .B \-d
     76 option.
     77 .PP
     78 If '\-' is specified for one or more input files, the standard input is
     79 used; standard input is read one line at a time, circularly for each
     80 instance of '\-'.
     81 .SH EXIT VALUES
     82 The
     83 .B paste
     84 utility exits 0 on successful completion, and >0 if an error
     85 occurs.
     86 .SH ENVIRONMENT VARIABLES
     87 The following environment variables affect the execution:
     88 .TP
     89 .B LANG
     90 provide a default value for the internationalization variables
     91 that are unset or null.
     92 .TP
     93 .B LC_ALL
     94 if set to a non-empty string value, override the values of all the
     95 other internationalization variables.
     96 .TP
     97 .B LC_CTYPE
     98 determine the locale for the interpretation of sequences of bytes
     99 of text data as characters (for example, single-byte as opposed to
    100 multi-byte characters in arguments and input files).
    101 .TP
    102 .B LC_MESSAGES
    103 determine the locale that should be used to affect the format and
    104 contents of diagnostic messages written to standard error.
    105 .SH CONFORMING TO
    106 The
    107 .B paste
    108 utility is IEEE Std 1003.2 (POSIX.2) compatible.
    109 .SH EXAMPLES
    110 .TP
    111 .I "ls | paste - - - -"
    112 .PP
    113 Write out a directory in four columns.
    114 .TP
    115 .I "paste -s -d '\et\en' file"
    116 .PP
    117 Combine pairs of lines from a file into single lines.
    118 .SH AUTHOR
    119 Written by Lorenzo Cogotti.
    120 .SH SEE ALSO
    121 .BR cut(1)
    122 .BR lam(1)