hmmm... if you want to know how to call OS commands from your PHP script, look at exec(), passthru(), system(), etc, functions in the PHP Manual (at http://php.net)
if you want to be able to run your script as a shell script (i.e. execute it from the command line) then you need to tell the script where the PHP interpreter is. On UNIX/LINUX systems, you can find the location of php by typing 'which php'. The OS will echo back an absolute path to the php executable. then on the first line of your script you have to have the following line:
#!/absolute_path_to_php
it MUST be the first line of the script. It tells the OS what to use to interpret the script.
hope that's what you were looking for.
marty