Homework help needed please


Results 1 to 3 of 3

Thread: Homework help needed please

  1. #1
    Join Date
    Sep 1999
    Posts
    3,202

    Talking Homework help needed please

    No, not homework *I* have to do... homework/labs for my students to do

    I need some ideas for simple lab exercises for the shell scripting portion of the Linux course I teach. Been using the same 4 intro labs for a few years, and I want to change it up some...

    Typically, none of my students have previous Linux experience, but this group of assignments come about half way thru the semester. Also, they typically have no programming background - for the most part, these are networking students working with Cisco, MS, and Novell stuff. All of the Novell stuff is focused on the Novell side, not the Linux host side.

    That said, here are the first intro scripts they write - I'd like to change them up, but I need ideas/suggestions.

    1) Write a script that clears the screen, then displays how much disk space is available and used on mounted filesystems (output of df) and how much RAM is being used and is free (output of free).

    2) Write a script that displays the current date/time in 5 various formats (I assign the formats).

    3) Re-write #2 so that you take a word as an argument (alpha, bravo, charlie, delta, echo) and displays the current date/time in one format (different format for each argument). This introduces workign with arguments and if/then (or a case select) statement.

    4) Write a script that takes one file or directory name as an argument, and tell me if it is a file or a directory, if the user running the script has read access to the file/dir, if the user running the script has write access to the file/dir, and if the user running the script has execute permissions on the file/dir.




    Ideas? Thanks!

  2. #2
    Join Date
    Jul 2003
    Location
    Spokane, Washington
    Posts
    580
    I'm not sure what the expectations are upon completion: whether these are covered or important, but...

    Count the number of running processes (ps and wc)
    Count the number of users logged in (users and wc)
    Find average number of processes per user (ps, users, wc, and math expansions)
    Find all files in /etc with their username therein (grep; though this might be getting too close to system files)
    How much space they're using in their home directory (ds) (then try measuring the space used by their classmates; results will vary with permissions I think)

    I guess these would also use piping and/or redirection. You could make some fun variations on these and plant some pre-determined results like a fake classmate with 300GB in his home directory.

  3. #3
    Join Date
    Oct 2011
    Posts
    2
    i never knew until i read it here. owala .thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •