Error in getopts(1p)
Hello,
there is an error at the end of the example:
printf "Remaining arguments are: %s\n$*"
should be
printf "Remaining arguments are: %s\n" "$*"
(cf.
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/getopts.html )
I would have sent a patch, but couldn't find the POSIX man page sources. Are they available somewhere?
Thanks,
Štěpán
PATCH 1/1 man-pages-posix-2017/man1p/getopts.1p: Fix usage of printf(1) in example
The original HTML files are correct, so this seems a bug in the conversion. For now, let's fix the page.
---
Hi, Štěpán!
You can check the source code here:
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages-posix.git/>
It's autogenerated from the original HTML POSIX pages, so we should fix the python script. But here's the fix you proposed.
Thanks,
Alex
man-pages-posix-2017/man1p/getopts.1p | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man-pages-posix-2017/man1p/getopts.1p +1 -1
@@ -337,7 +337,7 @@ if [ ! -z "$bflag" ]; then printf \(aqOption -b "%s" specified\en\(aq "$bval" fi shift $(($OPTIND - 1)) -printf "Remaining arguments are: %s\en$*" +printf "Remaining arguments are: %s\en" "$*" .fi .P .RE
Signature · 1 line
2.32.0