BASH script - How to get bash to check for the location of a file?

wasy

New Member
Hi I want my bash script to find where php is installed - this will be used on different linux servers, and some of them won't be able to use the \[code\]which\[/code\] command. Anyway I need help with that second line:\[code\]#!/bin/bashif (php is located in /usr/bin/php); then PHP = /usr/bin/phpelse PHP = /usr/local/zend/bin/phpfi$PHP script.php\[/code\]
 
Back
Top