What is the logic for the abbreviation in wc command?

Some info in man wc.

wc - print newline, word, and byte counts for each file. -c, --bytes print the byte counts -m, --chars print the character counts

Maybe it is better to use -b indicating byte and -c indicating character.Why the author use -c indicating byte and -m indicating character ?What is the logic for this abbreviation?

0

1 Answer

From POSIX ()

The -c option stands for "character" count, even though it counts bytes. This stems from the sometimes erroneous historical view that bytes and characters are the same size. Due to international requirements, the -m option (reminiscent of "multi-byte") was added to obtain actual character counts.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like