Last active
May 6, 2021 00:32
-
-
Save incfly/5a8918ebff96b123d95960d99f4b47f4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# https://unix.stackexchange.com/questions/25122/how-to-use-regex-with-awk-for-string-replacement | |
# second answer. | |
awk 'match($0, /VIR.*/) { $0 = "HERE=\"$(cd \"...\")" } 1 { print } ' ./input.sh |
This file contains hidden or 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
function rerun() { | |
# Put all the commands needed to perform a compile, upload, and job submission here. | |
# e.g copy to remote machine | |
scp python-main.py master:~/ | |
# start the hive run | |
hive start abc | |
# You can also pass some parameters for the function. | |
# E.G this way, `rerun job1 job2` will print out "job1 job2" line below. | |
echo $1 $2 | |
echo "done" | |
} | |
This file contains hidden or 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
VIRTUAL_ENV="your/path/abc/" | |
HERE="$(cd "$(dirname $(BASH_SOURCE[0]) && pwd))" | |
abc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage
source ./developer-flow.sh
for the rest of the bash operation,
rerun
, instead of a series of commands.rerun