Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 420 Bytes

SC2122.md

File metadata and controls

23 lines (14 loc) · 420 Bytes

Pattern: Use of unsupported <=/>= in shell script

Issue: -

Description

The operators <= and >= are not supported by Bourne shells. Instead of "less than or equal", rewrite as "not greater than".

Example of incorrect code:

[[ a &lt;= b ]]

Example of correct code:

[[ ! a > b ]]

Further Reading