Previous Section  < Day Day Up >  Next Section

LAB 40: WRITING THE info SHELL SCRIPT

  1. Write a program called info. Make sure you make the program executable with the chmod command before you try to execute it.

  2. The program should contain comments.

  3. The program should do the following when executed:

    1. Output the number of users logged on.

    2. Output the time and date.

    3. Output the present working directory.

    4. List all directory files in the parent directory.

    5. Print out the name of the shell being used.

    6. Print a line from the password file containing your login name.

    7. Print your user ID.

    8. Print the name of this machine.

    9. Print your disk usage.

    10. Print a calendar for this month.

    11. Tell the user good-bye and print the hour in nonmilitary time.

    Previous Section  < Day Day Up >  Next Section