Created
March 6, 2023 23:26
-
-
Save omamkaz/c93a46779746106413523e5e8a5022c5 to your computer and use it in GitHub Desktop.
run cpp 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])") | |
g++ $_file -o $_file_name && | |
./$_file_name && | |
rm $_file_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment