Skip to content

Instantly share code, notes, and snippets.

@dmnlk
Created September 16, 2014 06:03
Show Gist options
  • Select an option

  • Save dmnlk/9caf8aea372d132a4f28 to your computer and use it in GitHub Desktop.

Select an option

Save dmnlk/9caf8aea372d132a4f28 to your computer and use it in GitHub Desktop.

Revisions

  1. dmnlk created this gist Sep 16, 2014.
    13 changes: 13 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #/bin/sh

    post () {
    while read i
    do
    echo $i | grep -q "403"
    if [ $? = "0" ];then
    echo $i;
    fi
    done
    }

    ssh someUser@HogeHost tail -n 1 -f '/usr/local/apache/log/access_log' | post