Created
August 21, 2019 01:13
-
-
Save goddoe/aa727bf537e481f255c4749a89a28baf to your computer and use it in GitHub Desktop.
python in makefile
This file contains 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
Reference : xorho, https://stackoverflow.com/questions/2043453/executing-multi-line-statements-in-the-one-line-command-line | |
80 | |
this style can be used in makefiles too (and in fact it is used quite often). | |
python - <<EOF | |
import sys | |
for r in range(3): print 'rob' | |
EOF | |
or | |
python - <<-EOF | |
import sys | |
for r in range(3): print 'rob' | |
EOF | |
in latter case leading tab characters are removed too (and some structured outlook can be achieved) | |
instead of EOF can stand any marker word not appearing in the here document at a beginning of a line (see also here documents in the bash manpage or here). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment