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 )