Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 477 Bytes

SC2272.md

File metadata and controls

23 lines (14 loc) · 477 Bytes

Pattern: Use of == in command name

Issue: -

Description

Most likely, this was intended as a kind of comparison. To compare two values, use [ value1 = value2 ]. Both the brackets and the spaces around the = are relevant.

Example of incorrect code:

$a/$b==foo/bar

Example of correct code:

[ "$a/$b" = "foo/bar" ] 

Further Reading