Hi,
The following code shows that python may not work with <<-EOF
correctly. Is there a way to only allow bash to eat the same number of
spaces/tabs as the line where the python is being called.
~$ cat main.sh
#!/usr/bin/env bash
# vim: set noexpandtab tabstop=2:
for x in a b c
do
python <<-EOF
for i in xrange(3):
print i
EOF
done
~$ ./main.sh
File "<stdin>", line 2
print i
^
IndentationError: expected an indented block
File "<stdin>", line 2
print i
^
IndentationError: expected an indented block
File "<stdin>", line 2
print i
^
IndentationError: expected an indented block
--
Regards,
Peng