SHARE
TWEET

Untitled

a guest Feb 23rd, 2010 276 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. LOG=bla.log
  2. CANARY=kanarcek
  3.  
  4. (
  5. parent=$BASHPID
  6. tail -f $LOG | ( \
  7.         IFS=""
  8.         while read LINE; do
  9.                 if echo "$LINE" | grep "$CANARY" > /dev/null; then
  10.                         echo "found it!"
  11.                         break
  12.                 fi
  13.                 pkill -P $parent -f "tail -f $LOG"
  14.         done
  15. )
  16. )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top