ssh — guest: ~ connected

wc — count lines, words, characters and bytes

SYNOPSIS

wc [-l] [-w] [-c] [-m] [-L] <file...> wc (count piped input)

DESCRIPTION

Counts newlines, words and bytes in each file, printing one row per file plus a total row when several are given. With no file (or -), wc counts what is piped into it — e.g. ls | wc -l. With no flag, it prints lines, words and bytes (in that order).

OPTIONS

-l count lines (newlines) -w count words (whitespace-separated) -c count bytes (UTF-8) -m count characters (code points) -L length of the longest line

Single-letter flags can be combined, e.g. wc -lw file.

USE CASES

NOTES

A word is a run of non-blank characters, as in the Unix wc. Everything is counted in your browser: the text is never sent anywhere.

EXAMPLES

wc about.md wc -l about.md contact.md ls | wc -l echo "hello world" | wc -w

SEE ALSO

cat, grep, du, bc