Answered step by step
Verified Expert Solution
Link Copied!

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,

image text in transcribed

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

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

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions

Question

2 The main characteristics of the market system.

Answered: 1 week ago