From fb48e89be3255ea1b46198b39718ca4d5a2dbb63 Mon Sep 17 00:00:00 2001 From: Martin Bagge / brother Date: Tue, 30 Mar 2021 00:55:52 +0200 Subject: [PATCH] Created SC3012 (markdown) --- SC3012.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 SC3012.md diff --git a/SC3012.md b/SC3012.md new file mode 100644 index 0000000..38748d7 --- /dev/null +++ b/SC3012.md @@ -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