Search Results

Search: Posts Made By: Kslew82
5,560
Posted By Kslew82
bakunin, Ok. Thanks. You have been very...
bakunin,

Ok. Thanks. You have been very helpful.

Regards,
5,560
Posted By Kslew82
I have tried the below code but it produces no...
I have tried the below code but it produces no results.

awk -vDATE="$(TZ=CST+24 date '+%b %d')" '($2 == DATE){print}' /var/log/sudo.logI have also tried the following:
$ <root@aixtest3> /var/log...
5,560
Posted By Kslew82
Hello Ravinder, It seems that the script...
Hello Ravinder,

It seems that the script below just extracts the previous day's number and does not evaluate the whole date. So if the log has Dec 13 2014 and Jan 13 2015 it would print Jan 13 as...
5,560
Posted By Kslew82
Ravinder, It worked!!! Thank you for...
Ravinder,

It worked!!! Thank you for assistance.

Kslew82
5,560
Posted By Kslew82
Hi Ravinder, Thanks for your swift response....
Hi Ravinder,

Thanks for your swift response.

I tried the command you provided but I got the below result:
$ <root@aixtest3> /var/log > awk -vDATE="$(date -d"5 days ago" +%b" "%d)" '{if($1 OFS...
5,560
Posted By Kslew82
Hello bakunin, Here is what I tried but i...
Hello bakunin,

Here is what I tried but i didn't get any results:
grep "^$ (GMT+24 date+'%d/%m/%Y')" /var/log/sudo.log

Should this also grep the data also associated with the previous day's...
5,560
Posted By Kslew82
AIX UNIX - script on how to extract from log file with previous date
Hello,

I am new to this forum so any assistance would help.

I am currently trying to develop a script that extract all data from a log file with has the previous day's date.

$...
Showing results 1 to 7 of 7

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