↧
Answer by Praveen Kumar BS for AWK Command to Select Date Range
I believe Below command may work, As tested it worked fine for me sed -n '/Jul 9 [0-9]\{2\}:/,$p' /var/log/secure| sed '/Jul 9 [0-9]\{2\}:/d'
View ArticleAnswer by Panki for AWK Command to Select Date Range
You need to escape the inner quotation marks. "date -d \"$1 $2, 2019 $3\" +%s" So turn it into '{d=system("date -d \"$1 $2, 2019 $3\" +%s"); if ( 1562731201 < d ); print}'
View ArticleAWK Command to Select Date Range
I would like to monitor the /var/log/secure file for user activity. I need to be able to provide a start date and select lines only occurring after that date . I have played around with awk for a...
View Article