IT3110 @ utahtech
This assignment will hone your skills as a Bash shell programmer.
In this script you will pull various information out of an authentication log. Begin by manually downloading this into a directory for this assignment. You need not extract it, zcat
will cat it out for you. The script should be run like: ./parse_log.sh auth.log.2.gz
.
Write a script that will do the following:
users.txt
, sorted alphabetically. (Just the usernames will be in this file)ips.txt
, sorted ascending.early_users.txt
(just usernames again)** Challenge ** This isn’t graded, but see if you can figure out how to ask the user for the time interval that they would like to search for on option 3. Validate that they are actually keying in numbers. It would be a good idea to know how to validate stuff using regular expressions for the exam.
This should be passed off in class.