Skip to content

Instantly share code, notes, and snippets.

@jessejajit
Created August 23, 2012 01:16
Show Gist options
  • Select an option

  • Save jessejajit/3431045 to your computer and use it in GitHub Desktop.

Select an option

Save jessejajit/3431045 to your computer and use it in GitHub Desktop.

Revisions

  1. jessejajit created this gist Aug 23, 2012.
    7 changes: 7 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    #!/bin/sh
    YEAR=`date -d 'yesterday' +%Y`
    MONTH=`date -d 'yesterday' +%m`
    DAY=`date -d 'yesterday' +%d`
    #DAY=19

    echo grep -B2 -A3 contains /vol/syslog/HOSTS/db-*/$YEAR/$MONTH/$DAY/local3