Created
March 6, 2023 23:25
-
-
Save omamkaz/18dd76ae60d075c006e4c7eb1822b7df to your computer and use it in GitHub Desktop.
script to run java.java file direct.
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
#!/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