Skip to content

Instantly share code, notes, and snippets.

@somewhatabstract
Last active October 12, 2022 21:50
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 somewhatabstract/be9acf6150880bcf7db82f64d02541f0 to your computer and use it in GitHub Desktop.
Save somewhatabstract/be9acf6150880bcf7db82f64d02541f0 to your computer and use it in GitHub Desktop.
BashRC function for printing some versions out to the console on console open
printversions() {
echo " git: $(git --version | cut -d' ' -f3)"
echo " go: $(go version | cut -d' ' -f3 | cut -c3-)"
echo "java: $(java -version 2>&1 | head -n 1 | awk -F '"' '{print $2}')"
echo "node: $(nvm version | cut -c2-) (latest: $(nvm version-remote $(nvm version | cut -c2- | cut -d'.' -f1) | cut -c2-))"
echo " npm: $(npm --version)"
echo "ruby: $(ruby -v | cut -d' ' -f2)"
echo "rust: $(rustc --version | cut -d' ' -f2)"
}
printversions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment