Hamilton LaboratoriesHamilton C shell 2012User guideExternal utilities

paste

Oregon Coast

paste
Previous | Next

        Paste:  Merge Corresponding or Subsequent Lines

Usage:  paste [-sh-] [-d list] file ...

   Concatenate corresponding lines of the input files, writing
   the output to stdout.  Any newlines or carriage return-
   newline combinations at the end of any lines except those
   read from the last file are replaced with tab characters.

   If end-of-file is encountered on some but not all the
   files, paste behaves as if it were reading empty lines
   from those files.

   A filename of a single "-" (minus) character is a special
   case and will be interpreted as referring to stdin.

Options:

   -d list  Specifies a list of delimiters to be used instead
            the default tab character when pasting lines
            together.  If more than one character is given,
            paste will use them circularly, resetting back
            to the beginning of the list after each line of
            output.  The list may contain the following special
            escape sequences:

               \n   Carriage return-newline combination
               \t   Tab
               \\   Backslash
               \0   Empty string (not a null character).

   -s       Concatenate subsequent lines of each file rather
            than merging lines from different files.  The end
            of data from each file will be terminated with the
            line-end combination found there or a carriage
            return-newline combination if there was no line end.

   -h       Help.  (This screen.)
   --       End of options.


Previous | Next