【发布时间】:2010-09-04 08:28:04
【问题描述】:
我希望我的 bash 脚本找到 PHP 的安装位置 - 这将在不同的 Linux 服务器上使用,其中一些将无法使用 which 命令。我需要第二行的帮助:
#!/bin/bash
if (php is located in /usr/bin/php); then
PHP = /usr/bin/php
else
PHP = /usr/local/zend/bin/php
fi
$PHP script.php
【问题讨论】: