[PHP] Re: Tried to run PHP as shell script and got the error...

2005-06-13 Thread Scott Fletcher
Oh, forgot to add the ! to the #/usr/local/bin/php..   Since it's my
first time in shell scripting with php so I wasn't thinking correctly...

Scott Fletcher [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi!  I'm trying to run PHP as a shell script but I got the error
message...
 Source code below is ...

 --snip--
 #/usr/local/bin/php
 ?
echo Hello World!!\n;
 ?
 --snip--

 Attempt to run the file below and got the error

 --snip--
 -=[/usr/local/bin]==./ecbi_inquiry_pull_experian.sh
 Hello World!!\n
 ./ecbi_inquiry_pull_experian.sh: line 4: syntax error near unexpected
token
 `?'
 ./ecbi_inquiry_pull_experian.sh: line 4: `?'
 --snip--

 I checked to see if there's no spaces at the end on line 4 and there
 isn't...  So, how do I get it working so I can hook up the file to the
 crontab.

 Thanks,
  FletchSOD

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Tried to run PHP as shell script and got the error...

2005-03-11 Thread BlackDex
Try to put this at top.
!/usr/local/bin/php
so change the # for a !, becous thas is what is used to execute scripts etc.. 
:).

Hoop it will work.

Kind Regards,
BlackDex

Scott Fletcher [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 Hi!  I'm trying to run PHP as a shell script but I got the error message...
 Source code below is ...

 --snip--
 #/usr/local/bin/php
 ?
   echo Hello World!!\n;
 ?
 --snip--

 Attempt to run the file below and got the error

 --snip--
 -=[/usr/local/bin]==./ecbi_inquiry_pull_experian.sh
 Hello World!!\n
 ./ecbi_inquiry_pull_experian.sh: line 4: syntax error near unexpected token
 `?'
 ./ecbi_inquiry_pull_experian.sh: line 4: `?'
 --snip--

 I checked to see if there's no spaces at the end on line 4 and there
 isn't...  So, how do I get it working so I can hook up the file to the
 crontab.

 Thanks,
 FletchSOD 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Tried to run PHP as shell script and got the error...

2005-03-11 Thread Jochem Maas
BlackDex wrote:
Try to put this at top.
!/usr/local/bin/php
so change the # for a !, becous thas is what is used to execute scripts etc.. 
:).
not quite right: the shebang line requires both those chars :-)
http://dictionary.reference.com/search?q=shebang
quote #! used in Unix to mark the start of a script,/quote
I believe the '#' sign is used as the fist char for the simple practical
reason that the '#' signifies the start of a comment in just about every
scripting language out there - which means the shebang line doesn't f***
with the working of the subsequent script regardless. I may be completely
wrong, wouldn't be the first time :-)
Hoop it will work.
Kind Regards,
BlackDex
Scott Fletcher [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
Hi!  I'm trying to run PHP as a shell script but I got the error message...
Source code below is ...
--snip--
#/usr/local/bin/php
?
 echo Hello World!!\n;
?
--snip--
Attempt to run the file below and got the error
--snip--
-=[/usr/local/bin]==./ecbi_inquiry_pull_experian.sh
Hello World!!\n
./ecbi_inquiry_pull_experian.sh: line 4: syntax error near unexpected token
`?'
./ecbi_inquiry_pull_experian.sh: line 4: `?'
--snip--
I checked to see if there's no spaces at the end on line 4 and there
isn't...  So, how do I get it working so I can hook up the file to the
crontab.
Thanks,
FletchSOD 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php