If you are running bash you can use tab-completion to see what programs are available to you. So to see all programs that start with 'a' which you might run, press 'a' then tab twice. If you have a lot, then the shell will prompt you before continuing to show you all of them.
If you just want a catalog of everything available, then you can connect several programs with a pipe.
Code:
apropos -w '*' | awk '$2 == "(1)" || $2== "(8)"' | sort -u | less
Try them separately first.
Code:
apropos -w '*'
apropos -w '*' | awk '$2 == "(1)"'
apropos -w '*' | awk '$2 == "(8)"'
apropos -w '*' | awk '$2 == "(1)" || $2== "(8)"'
apropos -w '*' | awk '$2 == "(1)" || $2== "(8)"' | sort -u
apropos -w '*' | awk '$2 == "(1)" || $2== "(8)"' | sort -u | less
That is the power of a pipe. And of course you could save the list to a file with a redirect.
Code:
apropos -w '*' | awk '$2 == "(1)" || $2== "(8)"' | sort -u > inventory.txt
Then you have a reference to format and print out or just look through. It won't tell you all the options. You'll have to run each program individually with the -h option for that, or else use the 'man' utility to see the manual page. Some programs have excellent manual pages, others are quite poor. It varies quite a bit but by and large they are useful references, but not tutorials.
From that I think you can guess how to add 'wc' to that and which option in 'wc' will give you a line count.