Created
February 18, 2017 10:34
-
-
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
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
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