Grep /var/log/messages by date without leading zeros

Grep /var/log/messages by date without leading zeros

 
date=`date --date="yesterday" +%b\ %e`
 
grep $date /var/log/messages 

Comments

Popular posts from this blog

Securing the Pi-hole with fail2ban to prevent DNS Amplification attacks

Wazuh opensearch dashboard ConnectionError: connect ECONNREFUSED ::1:9200"

How to clean DB from old logs in Magento 1.x