Created
June 30, 2018 07:03
-
-
Save Swarchal/d2bd09cd246a12073acce48da595eb17 to your computer and use it in GitHub Desktop.
writing python within a shell script
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
| #!/bin/bash | |
| MY_ARG="world" | |
| python /dev/stdin "$MY_ARG" << EOF | |
| import sys | |
| print(f"Hello {sys.argv[1]}") | |
| EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment