Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

problem with displaying date and adding time

Shell Programming and Scripting


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 10-10-2008   -   Original Discussion by FuncMx
FuncMx FuncMx is offline
Registered User
 
Join Date: Oct 2008
Last Activity: 9 October 2008, 11:54 PM EDT
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
problem with displaying date and adding time

Hi,
I have a log file with contents like

81.49.74.131 - - [14/Sep/2008:07:19:55 +1000]
81.49.74.131 - - [14/Sep/2008:07:25:55 +1000]
116.112.52.31 - - [15/Sep/2008:07:28:36 +1000]
116.112.52.31 - - [15/Sep/2008:07:28:37 +1000]

I need an output like this
81.49.74.131 14/Sep/2008 Time duration: 00:06:00
116.112.52.31 15/Sep/2008 Time duration: 00:00:01

Please anyone suggest a script for this.

Thanks in advance
Sponsored Links
    #2  
Old Unix and Linux 10-10-2008   -   Original Discussion by FuncMx
Ygor's Unix or Linux Image
Ygor Ygor is offline Forum Advisor  
Advisor
 
Join Date: Oct 2003
Last Activity: 15 May 2015, 11:55 AM EDT
Location: 54.23, -4.53
Posts: 1,801
Thanks: 1
Thanked 114 Times in 99 Posts
Maybe adapt this: https://www.unix.com/shell-programmin...psed-time.html
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Adding date and time to file name cc_at_work Shell Programming and Scripting 7 11-15-2010 04:27 AM
Date time problem while executing perl script. ravimishra Programming 0 03-17-2010 11:42 AM
Date time problem jimmy_y Shell Programming and Scripting 4 06-10-2009 06:04 AM
Adding Date & time stamps to filename manish.s UNIX for Dummies Questions & Answers 1 03-13-2009 05:00 AM
Adding date and time to a log file ltodd2 UNIX for Dummies Questions & Answers 2 12-15-2008 01:37 PM



All times are GMT -4. The time now is 05:00 AM.