Skip to contentSkip to conversation

Error in getopts(1p)

PATCH New Štěpán Němec 2 participants 2 messages Aug 4, 2021 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#1 lore raw

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
index 6651993..616db6f 100644
@@ -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