I am pretty new to unix, and I have a project to do.
Part of the project asks me to determine the number of processes running and assign it to a variable. I know how to every part of the project but determine the number of processes running.
How can I get just the number of processes running?
Do you need the -f option with ps?
(All it does is use up a load of cpu cycles gathering extra information about each process, that you will then throw away.)
Another option is to use sar to list the system process table utilization: