Skip to content

Instantly share code, notes, and snippets.

@DinisCruz
Last active October 12, 2016 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DinisCruz/30953ce6454306fb6b1326a6b2f02b16 to your computer and use it in GitHub Desktop.
Save DinisCruz/30953ce6454306fb6b1326a6b2f02b16 to your computer and use it in GitHub Desktop.
simple example to automatically run
# run this on folder to monitor and location of on-change.sh file
fswatch -o . | xargs -n1 -I{} ./on-change.sh
#!/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)
}
#!/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