Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

. . Q4. Create a script named dmess_warnings.sh that will count the number of warning messages in the dmess log file and display them. 153

image text in transcribed
. . Q4. Create a script named dmess_warnings.sh that will count the number of warning messages in the dmess log file and display them. 153 marks] It is necessary to follow the instructions listed below when writing your script, The output from your script should match the format of the sample output below. The date should be printed as the first line of output and it should be displayed in the exact format shown in the sample output below. The warning messages should be retrieved from the dmesg log file (do a case insensitive search for the word "Warning in the dmesg log file in location: /var/log/dmesg). Any warning messages found should be stored in a temporary file. The total number of warning messages should be printed out. All of the warning messages should then be displayed to the user. There should be a blank line separating each line of output, as seen in the sample output below. . Notes : The date and number of warnings should be stored as variables within the script. Test your script on one of the servers (student1 or student2) and when you are satisfied that it is working, paste your script in the Answer box below. Any temporary files created should be removed after use. I The output of the script should match the sample output below. If the script is run as follows >/dmesg_warnings.sh Sample output

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_2

Step: 3

blur-text-image_3

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 2014 Nancy France September 15 19 2014 Proceedings Part 2 Lnai 8725

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448505, 978-3662448502

More Books

Students also viewed these Databases questions

Question

Difference between structure and union in C prgogramming

Answered: 1 week ago

Question

=+ Who do you think is right? Why?

Answered: 1 week ago