Coder Perfect

In a shell script, what does the “=” operator mean? [duplicate]


I came discovered a shell script with the following code:

for line in $LIST_ARRAY;do
if [[ $LIST_ARRAY =~ $line ]]
echo "true"

In this example, what is the significance of =?

Asked by cc4re

Solution #1

it’s the Equal Tilde operator that allows the use of regex in an if statement.

Answered by MimiEAM

Post is based on