Search exams, classes and guides
Search...
English
Sign in
Sign in
Home
Practice
Discover
Performance
More
CompTIA Linux+ XK0-006
Automation, Orchestration, and Scripting
Card 41 of 113
41 / 113
In Bash, the expression [[ $foo =~ regex ]] returns exit status 0 when the pattern is not found anywhere in the value o…
Front
In Bash, the expression [[ $foo =~ regex ]] returns exit status 0 when the pattern is not found anywhere in the value of foo.
Back
The =~ operator returns 0 (true) when the string matches the extended regular expression, and 1 when it does not match. A match can occur anywhere in the string unless anchored with ^ or $. The statement reverses the meaning of the exit status.
Show the back
Press the card to see the back
Study this deck