paste(1) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

paste(1)

paste(1)                         User Commands                        paste(1)



NAME
       paste - merge corresponding or subsequent lines of files

SYNOPSIS
       /usr/bin/paste [options] [file...]

DESCRIPTION
       The  paste  utility  concatenates  the corresponding lines of the given
       input files, and write the resulting lines to standard output.


       The default operation of paste concatenates the corresponding lines  of
       the  input  files.  The NEWLINE character of every line except the line
       from the last input file is replaced with a TAB character.


       If an EOF (end-of-file) condition is detected  on  one  or  more  input
       files,  but  not  all  input files, paste behaves as though empty lines
       were read from the files on which  EOF  was  detected,  unless  the  -s
       option is specified.

OPTIONS
       The following options are supported:

       -d list    Unless a backslash character (\) appears in list, each char‐
                  acter in list is an element specifying a  delimiter  charac‐
                  ter. If a backslash character appears in list, the backslash
                  character and one or more characters  following  it  are  an
                  element specifying a delimiter character as described below.
                  These elements  specify  one  or  more  delimiters  to  use,
                  instead of the default TAB character, to replace the NEWLINE
                  character of the input lines. The elements in list are  used
                  circularly.  That  is, when the list is exhausted, the first
                  element from the list is reused.

                  When the -s option is specified:


                      o      The last NEWLINE character in a file is not modi‐
                             fied.


                      o      The  delimiter  is  reset to the first element of
                             list after each file operand is processed.

                  When the option is not specified:


                      o      The NEWLINE characters in the file  specified  by
                             the last file is not modified.


                      o      The  delimiter  is  reset to the first element of
                             list each time a  line  is  processed  from  each
                             file.

                  If a backslash character appears in list, it and the charac‐
                  ter following it is used to represent the  following  delim‐
                  iter characters:


                  \n      NEWLINE character.


                  \t      TAB character.


                  \\      Backslash character.


                  \0      Empty string (not a null character). If 0 is immedi‐
                          ately followed by the character x, the character  X,
                          or  any character defined by the LC_CTYPE digit key‐
                          word, the results are unspecified.

                  If any other characters follow the  backslash,  the  results
                  are unspecified.


       -s         Concatenate  all of the lines of each separate input file in
                  command line order. The  NEWLINE  character  of  every  line
                  except the last line in each input file is replaced with the
                  TAB character, unless otherwise specified by the -d option.


OPERANDS
       The following operand is supported:

       file    A path name of an input file. If is specified for one  or  more
               of the files, the standard input is used. The standard input is
               read one line at a time, circularly, for each instance  of  dot
               ..  Implementations  support  pasting of at least 12 file oper‐
               ands.


EXAMPLES
       Example 1 Listing a Directory in One Column



       The following example lists a directory in one column:


         example% ls | paste -d " " −


       Example 2 Listing a Directory in Four Columns



       The following example lists a directory in four columns:


         example% ls | paste − − − −


       Example 3 Combining Pairs of Lines from a File into Single Lines



       The following example combines pairs of lines from a file  into  single
       lines:


         example% paste -s -d "\t\n" file


ENVIRONMENT VARIABLES
       See  environ(7) for descriptions of the following environment variables
       that affect the execution of paste:  LANG,  LC_ALL,  LC_CTYPE,  LC_MES‐
       SAGES, and NLSPATH.

EXIT STATUS
       The following exit values are returned:

       0      Successful completion.


       > 0    An error occurred.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Availabilitysystem/core-os  _  CSIEnabled  _  Interface
       StabilityCommitted _ StandardSee standards(7).


SEE ALSO
       cut(1), grep(1), attributes(7), environ(7), standards(7)



Oracle Solaris 11.4               20 May 2020                         paste(1)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3