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

개요

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

wc(1)

wc(1)                            User Commands                           wc(1)



NAME
       wc - display a count of lines, words and characters in a file

SYNOPSIS
       /usr/bin/wc [-c | -m | -C] [-lw] [file...]


       /usr/bin/wc [ [-c | --bytes] | [-m | --chars] | [-C] ]
                         [-l | --lines] [-w | --words] [--help]
                         [ [--files0-from=FILE] | [file ...] ]

DESCRIPTION
       wc  reads one or more input files and, by default, for each file writes
       a line containing the number of NEWLINEs, words, and bytes contained in
       each file followed by the file name to standard output in that order. A
       word is defined to be a non-zero length string delimited by isspace(3C)
       characters.


       If  more than one file is specified, wc writes a total count for all of
       the named files with total written instead of the file name.


       By default, wc writes all three counts. Options can specified  so  that
       only  certain  counts  are  written. The -c and -m options are mutually
       exclusive.


       If no file is specified as an operand, or if the file is  -,  wc  reads
       from  standard input and no filename is written to standard output. The
       start of the file is defined as the current offset.

OPTIONS
       The following options are supported for both /usr/bin/wc and  ksh.  The
       long form of the options are only available with ksh:

       -c, --bytes              Counts bytes.


       -C                       Counts characters. Same as -m.



       --files0-from=FILE       Reads  input  from  a  NULL terminated list of
                                files in FILE. If FILE is '-',  then  standard
                                input is used.


       -l, --lines              Counts lines.


       -L, --max-line-length    Reports the length of the longest line.


       -m, --chars              Counts characters. Same as -C.


       -w, --words              Counts  words delimited by white space charac‐
                                ters or new line characters. Delimiting  char‐
                                acters are Extended UNIX Code (EUC) characters
                                from any code set defined by isspace(3C).



       If no option is specified, the default is -lwc  (counts  lines,  words,
       and bytes.)

OPERANDS
       The following operand is supported:

       file    A  path  name  of an input file. If no file operands are speci‐
               fied, the standard input is used.


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

EXIT STATUS
       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
       cksum(1),  isspace(3C),  iswalpha(3C),   iswspace(3C),   setlocale(3C),
       attributes(7), environ(7), standards(7)



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