Linux from the command line - Using the Word Count (wc) command
wc is a very simple program that is very handy and very powerful.
It allows you to count things. The obvious use is counting the words in an essay to make sure you've reached the assigned 5000 word minimum for example. But when combined with bash scripts, wc has a lot more diverse and powerful uses, especially when combined with pipes and redirects.
For example, if you want to know how many PCI devices are in your system, type:
lspci | wc -l
USB devices?
lsusb | wc -l
https://www.howtoforge.com/linux-wc-command-explained-for-beginners-6-examples/
No comments:
Post a Comment