Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need to write a VIM UNIX/Linux commandline program using the tools sed, sort, uniq and printf to search a logfile. For someone that know

I need to write a VIM UNIX/Linux commandline program using the tools sed, sort, uniq and printf to search a logfile. For someone that know linux it should be a simple matter and only take a few minutes. I hope you have someone there with those qualifications because I am lost on this assignment.

Just send me the code. Here is the first part of what it needs to do:

image text in transcribed

Requirements Your script shall be named flog and be marked executable. Here is how you execute your script: ./flog LOGFILE Example ./flog /var/classes/cs3030/lab3/secure 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 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 html>, ,

and
tags as shown should be output using the HTML characters " Print Usage: flog LOGFILE and exit with return code 1 if the user does not specify a LOGFILE on the commandline. Do not prompt the user for anything

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2016 Riva Del Garda Italy September 19 23 2016 Proceedings Part 1 Lnai 9851

Authors: Paolo Frasconi ,Niels Landwehr ,Giuseppe Manco ,Jilles Vreeken

1st Edition

3319461273, 978-3319461274

More Books

Students also viewed these Databases questions