Updated SC2039 (markdown)

Mingye Wang
2015-11-01 22:03:14 -05:00
parent 59d44ad951
commit 0776a306b1

@@ -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. 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. 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 ```sh
# TODO: Interpret it back to printf escapes for hard-to-copy chars like \t? # 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()( reuse_quote()(
for i; do echo -n \'; echo -n "$i" | sed -e "s/'/'\\\\''/g"; echo -n "' "; done for i; do echo -n \'; echo -n "$i" | sed -e "s/'/'\\\\''/g"; echo -n "' "; done
) )