if [[ "\"$*\"" =~ apache2 ]] || [[ "\"$*\"" =~ php-fpm ]]; then echo "match"; done # test for string in any argument position #bash #regex #test