Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I'm not sure what the following line does in a bash script:
if echo $line | grep -F = &>/dev/null
I know &>/dev/null is short for >/dev/null 2>&1, I'm not sure, however, what the = is for and I cannot find any explanation.
if [[ $line == *"="* ]]; then ...
From man grep
Interpret PATTERN as a list of fixed strings, separated by
newlines, any of which is to be matched. (-F is specified by
So it's just checking for the presence of = as a literal string in $line
case $line in
(*=*) : this would be the then block
(*) : maybe an else\?
...only not very well, or nearly as quickly.
Required, but never shown