, . -, , =~ ==. git version git version 1.8.5.2 (Apple Git-48). -, $ [[ "GIT_VERSION" == "git version" ]].
, , , . ( : =~ [[ ]], *).
if [[ "$DRUSH_VERSION" =~ "Drush Version" ]]; then
...
if [[ "$GIT_VERSION" =~ "git version" ]]; then
...
, , , , , :
if which $prog_name 2>/dev/null; then...
:
which $prog_name && do something found || do something not found
. git:
if which git 2>/dev/null; then
...
which git && echo "git found" || echo "git NOT found"
. stderr /dev/null , $prog_name .