Question description

cript shall be named ~/cs3030/lab3/flog and be marked executable. Here is how you execute your script:
./flog LOGFILE
Your script shall search LOGFILE for all lines containing this string:
“Failed password for USERID”
where USERID is either the name of a user or the word “invalid”. You are to perform the following
operations:
• Change the word “invalid” to
• Count the number of every failed password messages for each user (including )
• Sort the output first by number of occurrences in descending order, then by userid in ascending order
• Output a header with the current date as shown below
• Punctuate all large numbers with commas for readability (hint: printf)
• Produce an HTML document on stdout with , , and tags as shown below
• “” should be output using the HTML characters “<” and “>”
• Print Usage: flog LOGFILE and exit with return code 1 if the user does not specify a LOGFILE
When your script is working, test it with the provided sample logfile:

Published by
Ace Tutors
View all posts