Skip to content

Instantly share code, notes, and snippets.

@JohnPreston
Created May 6, 2015 09:58
Show Gist options
  • Save JohnPreston/d6057ecbf8704a96e4e2 to your computer and use it in GitHub Desktop.
Save JohnPreston/d6057ecbf8704a96e4e2 to your computer and use it in GitHub Desktop.
Wait for ITER to show up in a file
tail -500f /var/log/messages | while read LINE ;
do if [ `echo $LINE | grep sda | wc -l` -gt 0 ];
then echo victory ; killall tail ; exit 0;
fi ; done
# can be a single line :)
# replace 'sda' by the ITER you are looking for
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment