Quantcast
Channel: AWK Command to Select Date Range - Unix & Linux Stack Exchange
Browsing latest articles
Browse All 3 View Live

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 Article



Answer 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 Article

AWK 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
Browsing latest articles
Browse All 3 View Live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>