Last active
October 12, 2016 13:53
-
-
Save DinisCruz/30953ce6454306fb6b1326a6b2f02b16 to your computer and use it in GitHub Desktop.
simple example to automatically run
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
# run this on folder to monitor and location of on-change.sh file | |
fswatch -o . | xargs -n1 -I{} ./on-change.sh |
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
#!/usr/bin/env bash | |
function test2 { | |
parse test.xml | |
} | |
function parse { | |
clear | |
echo '-----' | |
local file=$1 | |
echo $(app_name='webgoat'; grep $app_name $file | awk -F"\"" '{print $2}') | |
echo $(date) | |
} |
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
#!/usr/bin/env bash | |
. ./bash_parse.sh | |
test2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment