From 0776a306b1bde275c301ff151485b82a6498bb71 Mon Sep 17 00:00:00 2001 From: Mingye Wang Date: Sun, 1 Nov 2015 22:03:14 -0500 Subject: [PATCH] Updated SC2039 (markdown) --- SC2039.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SC2039.md b/SC2039.md index ee01bb4..369e4df 100644 --- a/SC2039.md +++ b/SC2039.md @@ -1,4 +1,4 @@ -## In POSIX sh, [\[ ]] is undefined. +## In POSIX sh, *something* is undefined. You have declared that your script works with `/bin/sh`, but you are using features that have undefined behavior according to the POSIX specification. It may currently work for you, but it can or will fail on other OS, the same OS with different configurations, from different contexts (like initramfs/chroot), or in different versions of the same OS, including future updates to your current system. @@ -136,6 +136,7 @@ POSIX: ```sh # TODO: Interpret it back to printf escapes for hard-to-copy chars like \t? +# See also: http://git.savannah.gnu.org/cgit/libtool.git/tree/gl/build-aux/funclib.sh?id=c60e054c36bb9a937e6d98fd87d6345d20b3f446#n1029 reuse_quote()( for i; do echo -n \'; echo -n "$i" | sed -e "s/'/'\\\\''/g"; echo -n "' "; done )