Question: Assume that you have written a script named checkLogins.sh that parses the utmp and btmp files, and then builds a report of suspicious activity. You

Assume that you have written a script named checkLogins.sh that parses the utmp and btmp files, and then builds a report of suspicious activity. You want run this command monthly, but each month you want to save a new copy of the file. To accomplish this you decide to save this report in a file that always begins with the string suspicious but ends with a string that identifies the date the report was created. The date string should be a 6 digit number with the first 4 numbers representing the year and the last 2 numbers representing the month. For example if the date is April 1, 2077 the file name would be suspicious.207704. Within your script you have a variable named currentDate that you want to hold the date string. What commands would you use in the script to set the value of currentDate to the required date string? Note - you're not building the entire filename, just the date string.

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!