Published using Google Docs
introducao
Updated automatically every 5 minutes

Índice

Introdução

wc

wc --help

Opções

Introdução

wc

# wc /etc/passwd

  30   62 1540 /etc/passwd

wc --help

# wc --help

Uso: wc [OPÇÃO]... [ARQUIVO]...

 ou: wc [OPÇÃO]... --files0-from=A

Print newline, word, and byte counts for each FILE, and a total line if

more than one FILE is specified.  A word is a non-zero-length sequence of

characters delimited by white space.

Se ARQUIVO não for especificado ou for -, lê a entrada padrão.

The options below may be used to select which counts are printed, always in

the following order: newline, word, character, byte, maximum line length.

  -c, --bytes            print the byte counts

  -m, --chars            print the character counts

  -l, --lines            print the newline counts

      --files0-from=F    read input from the files specified by

                           NUL-terminated names in file F;

                           If F is - then read names from standard input

  -L, --max-line-length  print the maximum display width

  -w, --words            print the word counts

      --help     mostra esta ajuda e finaliza

      --version  informa a versão e finaliza

Opções

$ wc -c /etc/passwd

1873 /etc/passwd

$ wc -l /etc/passwd

35 /etc/passwd

$ wc -w /etc/passwd

57 /etc/passwd