Skip to content

Instantly share code, notes, and snippets.

@Tarrasch
Created March 9, 2011 14:08
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 Tarrasch/862239 to your computer and use it in GitHub Desktop.
Save Tarrasch/862239 to your computer and use it in GitHub Desktop.
Helpful commands in concurrent programming
# Starta train
alias setc='setup_course tda381'
alias runt='cd ~/ConcLabbar/Lab1/Trainspotting/Trainspotting/build/classes/ && 2 "tsim bana" "java Lab1 30 20"'
function runt2() {
cd ~/ConcLabbar/Lab1/Trainspotting/Trainspotting/build/classes/ && 2 "tsim -s $1 bana" "java Lab1 10 5"
}
# comile-runna jr-program
function ja(){
clear
echo "Compiling $*"
jrc *.jr 2>&1 | grep -v "^Note: "
jr $* 2>&1 | grep -v "^Note: "
}
function ja_(){
clear
echo "Compiling $*"
jrc *.jr && jr $*
}
function ja2(){
clear
echo "Compiling $*"
a = jrc *.jr 2>&1 | grep -v "^Note: "
if [ "$a" ]; then
jr $* 2>&1 | grep -v "^Note: "
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment