bash – cheat sheet – conditions

function has_script {
  cd /var/www/html;
  [[ $(npm run | grep "$1" | wc -l) > 0 ]]
}

has_script "start" && echo "true";
exit;
no square brackets

Leave a Reply

Your email address will not be published.