# expected $ echo test | xargs -t echo echo test test $ echo test | xargs -p echo echo test?...y test # actual $ echo test | xargs -t echo echo test test $ echo test | xargs -p echo echo test?...y $ locale; locale -k yesexpr LANG=en_AU.UTF-8 LC_CTYPE="en_AU.UTF-8" LC_COLLATE="en_AU.UTF-8" LC_TIME="en_AU.UTF-8" LC_NUMERIC="en_AU.UTF-8" LC_MONETARY="en_AU.UTF-8" LC_MESSAGES="en_AU.UTF-8" LC_ALL= yesexpr="^(([yY]([eE][sS])?)|([yY]))" $ export LANG=POSIX $ locale; locale -k yesexpr LANG=POSIX LC_CTYPE="POSIX" LC_COLLATE="POSIX" LC_TIME="POSIX" LC_NUMERIC="POSIX" LC_MONETARY="POSIX" LC_MESSAGES="POSIX" LC_ALL= yesexpr="^[yY]" $ echo test | xargs -p echo echo test?...y test
The problem here is that yesexpr and noexpr are no longer BREs as xargs assumes.
A commit references this bug: Author: yuripv Date: Sat Dec 12 15:38:32 UTC 2020 New revision: 368580 URL: https://svnweb.freebsd.org/changeset/base/368580 Log: xargs: compile yesexpr as ERE yesexpr is an extended regular expression for quite some time now, use appropriate flag when compiling it. PR: 238762 Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D27509 Changes: head/usr.bin/xargs/xargs.c