I want to write something detecting where PHP is installed and then execute php after that eg:
./find_php.sh /path/to/php/file.php
So I can get it to detect the php I want to use and stick it in a variable, but I don't know how to get it to execute the following php file after. Here's a skeleton of what I've got:
#!/bin/bash
if [ -e /usr/local/zend/bin/php ]; then
PHP=/usr/local/zend/bin/php
else
PHP=/usr/bin/php
fi
$PHP <execute php>
Edit - thanks got it, just needed exec $PHP "$@"