Created
August 22, 2014 22:05
-
-
Save hliang/56862e0277a7ce1ea7d6 to your computer and use it in GitHub Desktop.
Condition evaluation of command output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# condition evaluation of command output | |
# e.g. | |
# keep checking whether a file contains PATTERN string | |
while [[ $(grep -c 'PATTERN' test.txt) == 1 ]]; do echo test.txt contains PATTERN ; date; sleep 2; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment