Skip to content

Instantly share code, notes, and snippets.

@arnabdas
Created February 18, 2017 10:34
Show Gist options
  • Save arnabdas/8ca2b0370488ab17140ca843497f4af2 to your computer and use it in GitHub Desktop.
Save arnabdas/8ca2b0370488ab17140ca843497f4af2 to your computer and use it in GitHub Desktop.
A simple function to add to bashrc or zshrc to compile, link, run a Go source code file and delete the intermediate files with one command
rungo() {
gccgo -c $1
file="${1%%.*}"
gccgo -o $file ($file).o
./$file
rm -f $file
rm -f ($file).o
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment