Can someone explain how this bash script works? The part I don't understand is """:"
, what does this syntax mean in bash?
#!/bin/sh
""":"
echo called by bash
exec python $0 ${1+"$@"}
"""
import sys
print 'called by python, args:',sys.argv[1:]
test running result:
$ ./callself.sh xx
called by bash
called by python, args: ['xx']
$ ./callself.sh
called by bash
called by python, args: []