Search Results

Search: Posts Made By: Juha
2,851
Posted By Chubler_XL
If you have gnu awk available you could use...
If you have gnu awk available you could use mktime() like this:

gawk '
/PUT/||/DELETE/{
file=$5;
gsub(".*/", "", file)
stamp=$1 " " $2
gsub("[:-]", " ", stamp)
}
/PUT/ {
...
2,851
Posted By balajesuri
[user@host ~]$ cat test.sh #! /usr/bin/bash ...
[user@host ~]$ cat test.sh
#! /usr/bin/bash

file=$1
logfile="file"

in_dt=$(grep "PUT.*$file" $logfile | cut -d' ' -f1,2)
out_dt=$(grep "DELETE.*$file" $logfile | cut -d' ' -f1,2)
...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 10:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy