shell script to run python program

1.

#!/bin/bash
python -c 'print "111";'

2.

#! / bin / bash
Python << EOF # beginning and end meet the same line with      
Print '11'
EOF

 Add a "-" the bottom line of the first EOF can not but must be "tal"

1, consider the following requirements, executed in the main shell commands into other commands, the following input, think as a command input, instead of entering the main shell, how do?

2, << EOF, told the main shell, subsequent input, input commands or other sub-shell until EOF encountered so far, and then return to the main shell.

3, EOF here just delimiter, use other character can.

Guess you like

Origin www.cnblogs.com/chengfengchi/p/11305497.html