mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Created SC3012 (markdown)
28
SC3012.md
Normal file
28
SC3012.md
Normal file
@@ -0,0 +1,28 @@
|
||||
## In POSIX sh, lexicographical \> is undefined.
|
||||
|
||||
### Problematic code:
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
x=1.31
|
||||
y=1.29
|
||||
! [ $x \> $y ]
|
||||
```
|
||||
|
||||
### Correct code:
|
||||
|
||||
The easiest fix is to switch to a shell that *does* support lexicographical \>.
|
||||
|
||||
Please add common code examples.
|
||||
|
||||
### Rationale:
|
||||
|
||||
Please expand on this section.
|
||||
|
||||
### Exceptions:
|
||||
|
||||
Please expand on this section.
|
||||
|
||||
### Related resources:
|
||||
|
||||
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_128
|
Reference in New Issue
Block a user