1 2 3 4 5 6 7 8 9
#!/bin/bash set -e echo "Waiting for $1 to say '$2'" while ! grep -q "$2" $1; do sleep 2 done