Answered step by step
Verified Expert Solution
Question
1 Approved Answer
LINUX please, Use sed for the following question. Given that the file named userLog is a log file of when users log in to the
LINUX please,
Use sed for the following question. Given that the file named userLog is a log file of when users log in to the system in the current month. Each line of the file is for 1 login session, with the fields for user id, terminal number, IP , day, time, duration. Here are some sample lines of userLog : The duration field is the last field of each line, in parentheses. It has the (hh:mm) format with 2 digits for the hour and 2 digits for the minute. Use sed to print out the duration field in the format: hh hrmmmin where hh and mm are the digits from the duration field. Example of the print out of the 6 sample lines above: 03hr05min 00hr26min 03hr20min 00hr06min 00hr21min 00hr04min You can write a sed command line or a sed script. If writing a sed script, make sure you show how to run the sed script. Your
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started