samedi 2 octobre 2021

How to include "and" and "or" in a if statement? Bash

I'm not sure to understand how to properly include && and || in an if statement. For instance,

if [ $# -eq 2 ] && [[ $1 =~ -x ] || [ $1 =~ -z ]]

I don't see why this if statement is wrong.

Aucun commentaire:

Enregistrer un commentaire