Created
April 15, 2025 07:00
-
-
Save coder114514/45ea94c8b7187c6cfb54f9b501a322be to your computer and use it in GitHub Desktop.
A trick to make .c files run like an executable.
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
#if 0 | |
bin="$(basename "$0")" && bin="${bin%%.*}" && cc -g -Wall -o "$bin" "$0" && exec ./"$bin" "$@" || exit | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment