Or even this:
Code:
httpd -M | sort | cat -n
httpd -M | sort | cat -n | column
And so on.
Going from left to right, the stdout of one program becomes the stdin of the next. The pipeline can be made arbitrarily long by connecting more utilities with pipes.
Edit: I notice an off-by-one error in the above approaches, since the title line is not itself a module name:
Code:
httpd -M | grep -v Loaded | sort -k2,2r -k1,1 | cat -n
See the manual pages for
grep,
sort, and
cat.