Skip to content

Instantly share code, notes, and snippets.

@rahgurung
Created November 9, 2019 13:40
Show Gist options
  • Save rahgurung/5d6f801b9fd370deaaa1ac4465cd61fe to your computer and use it in GitHub Desktop.
Save rahgurung/5d6f801b9fd370deaaa1ac4465cd61fe to your computer and use it in GitHub Desktop.
script for c/c++ environment
make() {
if [ $1 = "run" ]; then
  g++ -Wall -o "$2" "$2".cpp
  ./"$2"
  printf "\n"
  else
  g++ -Wall -o "$1" "$1".cpp
  printf "Success! \n"
  fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment