Question: Stuck on a linux coding question, got an idea but need help what I have so far #!/bin/bash #Exik von Elm #Lab 3-Failed Login Report

Stuck on a linux coding question, got an idea but need help

what I have so far

#!/bin/bash #Exik von Elm #Lab 3-Failed Login Report #CS 3030 - Scripting

Languages if [ -z "$1" ] then fi echo "Usage: flog LOGFILE"

#!/bin/bash #Exik von Elm #Lab 3-Failed Login Report #CS 3030 - Scripting Languages if [ -z "$1" ] then fi echo "Usage: flog LOGFILE" exit 1 #grab current date rptdate='date' sed -n "s/.*Failed password for \([a-z0-9A-Z_]*\) */\1,p" $1 >slout sort s2out uniq - s3out sort -kl, lnr -k2, 2 s3out >s4out sed "s/invalid/\ < UNKOWN\>/" s5out cat s5out while read mycount myuserid; do printf " 'd %s " "Smycount" "Smyuserid" >>flog.html done #adding header for huml sed -i "1s/^/\ Failed Login Attempts Report $rptdate /" flog.html echo " " >>./flog.html sed -i '$3/$/ /' flog.html rm ./s*out exit 0

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 Programming Questions!