Re: Strange syntax error, occurs only when script is executed directly [solved]

2014-04-22 Thread Antoon Pardon
On 22-04-14 14:09, Chris Angelico wrote: On Tue, Apr 22, 2014 at 8:29 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: However if I call the script directly and want the #! line do its work I get the following error. # /usr/local/bin/ldapwatch /opt/local/log/openldap.log | head

Re: Strange syntax error, occurs only when script is executed directly [solved]

2014-04-22 Thread Chris Angelico
On Tue, Apr 22, 2014 at 10:21 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Yes that was it. I changed the first line of my script to: #!/opt/local/bin/python2.7 and it now works. Excellent! Shebangs are *extremely* specific, so you may want to consider using /usr/bin/env python to

Re: Strange syntax error, occurs only when script is executed directly [solved]

2014-04-22 Thread Antoon Pardon
On 22-04-14 14:26, Chris Angelico wrote: On Tue, Apr 22, 2014 at 10:21 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Yes that was it. I changed the first line of my script to: #!/opt/local/bin/python2.7 and it now works. Excellent! Shebangs are *extremely* specific, so you may

Re: Strange syntax error, occurs only when script is executed directly [solved]

2014-04-22 Thread Chris Angelico
On Tue, Apr 22, 2014 at 11:01 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: On 22-04-14 14:26, Chris Angelico wrote: On Tue, Apr 22, 2014 at 10:21 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Yes that was it. I changed the first line of my script to:

Re: Strange syntax error, occurs only when script is executed directly [solved]

2014-04-22 Thread Andrew Cooper
On 22/04/2q014 13:26, Chris Angelico wrote: On Tue, Apr 22, 2014 at 10:21 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Yes that was it. I changed the first line of my script to: #!/opt/local/bin/python2.7 and it now works. Excellent! Shebangs are *extremely* specific, so you may

Re: Strange syntax error, occurs only when script is executed directly [solved]

2014-04-22 Thread Andrew Cooper
On 22/04/2q014 13:26, Chris Angelico wrote: On Tue, Apr 22, 2014 at 10:21 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Yes that was it. I changed the first line of my script to: #!/opt/local/bin/python2.7 and it now works. Excellent! Shebangs are *extremely* specific, so you may