Question: Shell Scripting - learning how to use grep, awk, and uniq Your script shall search LOGFILE for all lines containing this string Failed password for

Shell Scripting - learning how to use grep, awk, and uniq

Shell Scripting - learning how to use grep, awk, and uniq Your

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 perfom 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 "?UNKNOWN>" should be output using the HTML characters "

Failed Login Attempts Report as of Thu Dec 25 07:00:00 MST 2014


br/> 505root 17 adm 16 ftp 10 apache 10 mail 2 backuppc 2 games 2 news 2 squid 1 bin 1 nobody 1 operator 1 smmsp 1 sshd

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!