1

GAWK/GREP Equivalent

view story
linux-howto

http://www.unix.com – What is GAWK equivalent to greps -B 5 -A 5? Code: zgrep -i "^oct 20" /var/log/syslog*|grep -iB 5 -A 5 'postfix\/pickup /var/log/syslog.1.gz:Oct 20 01:55:01 elmo CROND[7682]: (mail) CMD (/usr/bin/python -S /usr/lib64/mailman/cron/gate_news) /var/log/syslog.1.gz:Oct 20 02:00:01 elmo CROND[7701]: (mail) CMD (/usr/bin/python -S /usr/lib64/mailman/cron/gate_news) /var/log/syslog.1.gz:Oct 20 02:00:02 elmo CROND[7704]: (root) CMD (/home/davider/scripts/backups/saintbk.sh full ) /var/log/syslog.1.gz:Oct 20 02:00:03 elmo kernel:  CIFS VFS: Error 0xfffffffb on cifs_get_inode_ (HowTos)