Changes

Jump to: navigation, search

SPR720 BASH Scripting Lab

223 bytes added, 04:46, 13 October 2008
Hints and suggestions
done
= Writing [[BASH ]] Scripts =
Write scripts to do three of the following tasks:
* # Loop through the files in your home directory, and for each readable file, ask whether the file should be printed, mailed to you, or ignored (P/M/I) and then take the appropriate action.* # Display the longest and shortest usernames on the system (usernames are in the first field in /etc/passwd).* # Count the number of users with user IDs between 500 and 10000 on the system (user IDs are the third field in /etc/passwd).* # Display the names of any filesystems which have less than 10% free space available (see the <code>df</code> command for this information).* # Ask the user for an e-mail address, then send the output of the <code>dmesg</code> command to that address.* # Count the number of files in the user's home directory which are not readable.* # For each directory in the $PATH, display the number of executable files in that directory. == Hints and suggestions == See the manpages for these commands: * wc (see the -w, -c, -l, and -L options)* lpr* mail* cut (see the -d and -f options)* df Post your answer in discussion...
= Deliverable =
Blog about your experience with this lab, and include a link to one of the script scripts you've written. [[Category:SPR720]]

Navigation menu