Skip to content

Instantly share code, notes, and snippets.

@omamkaz
Created March 6, 2023 23:25
Show Gist options
  • Save omamkaz/18dd76ae60d075c006e4c7eb1822b7df to your computer and use it in GitHub Desktop.
Save omamkaz/18dd76ae60d075c006e4c7eb1822b7df to your computer and use it in GitHub Desktop.
script to run java.java file direct.
#!/usr/bin/bash
_file=$1
_file_name=$(python3 -c "print('$_file'.split('.', maxsplit=1)[0])")
javac $_file &&
java $_file_name &&
rm $_file_name.class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment