The ps command is different on BSD (Berkeley UNIX), System 5 (AT&T UNIX), and Linux. On System 5, the command to list all processes is
ps –ef
On BSD UNIX, the command is
ps aux
On Linux, the command is
ps -aux
Write a program called systype that will check for a number of different system types. The cases to test for will be
AIX
Darwin (Mac OS X)
Free BSD
HP-UX
IRIX
Linux
OS
OSF1
SCO
SunOS (Solaris/SunOS)
ULTRIX
Solaris, HP-UX, SCO, and IRIX are AT&T-type systems. The rest are BSD-ish.
The version of UNIX you are using will be printed to stdout. The system name can be found with the uname –s command or from the /etc/motd file.