LAB 16: THE case STATEMENT

 <  Day Day Up  >  

LAB 16: THE case STATEMENT

  1. The ps command is different on BSD and AT&T UNIX. On AT&T UNIX, the command to list all processes is:

     ps ef 

    On BSD UNIX and 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 (10.x+), SCO, and IRIX are AT&T-type systems. The rest are BSD-ish.

    The version of UNIX/Linux 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.

 <  Day Day Up  >  


UNIX Shells by Example
UNIX Shells by Example (4th Edition)
ISBN: 013147572X
EAN: 2147483647
Year: 2004
Pages: 454
Authors: Ellie Quigley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net