freebsd-dev/tools/regression/bin/sh/errors/backquote-error2.0
Jilles Tjoelker 47e5ae08a1 sh: Disallow mismatched quotes in backticks (...).
Due to the amount of code removed by this, it seems that allowing unmatched
quotes was a deliberate imitation of System V sh and real ksh. Most other
shells do not allow unmatched quotes (e.g. bash, zsh, pdksh, NetBSD /bin/sh,
dash).

PR:		bin/137657
2009-10-01 21:40:08 +00:00

8 lines
187 B
Plaintext

# $FreeBSD$
sh -c 'echo `echo .BA"DCODE.`
echo ".BAD"CODE.' 2>&1 | grep -q BADCODE && exit 1
echo '`"`' | sh -n 2>/dev/null && exit 1
echo '`'"'"'`' | sh -n 2>/dev/null && exit 1
exit 0