Skip to content

Instantly share code, notes, and snippets.

@zeroxia
Created August 13, 2022 14:08
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 zeroxia/05269debf1eb55b776fa66b0c58267be to your computer and use it in GitHub Desktop.
Save zeroxia/05269debf1eb55b776fa66b0c58267be to your computer and use it in GitHub Desktop.
This script can be executed as shell script while it is actually a python script.
#!/bin/sh
##
## This script can be executed as shell script while it is actually a python script.
##
unused="""
"
echo 'python3 "'$0'"' "$@"
exec python3 "$0" "$@"
"
"""
import sys
print("args: {}".format(sys.argv))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment