Check if nginx config test is sucessfull as condition for bash if
I want to check the validity of my nginx configuration using nginx -t using it as a condition for a bash script. if [[ $(nginx -t) = *"successful"* ]]; then echo "success"; else echo "failure"; fi While the output of…