FreeBSD Bugzilla – Attachment 177862 Details for
Bug 215207
[patch] getopt(1) example mangles command-line arguments with embedded spaces
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
getopt.1.patch (text/plain), 460 bytes, created by
Diomidis Spinellis
on 2016-12-11 08:35:09 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Diomidis Spinellis
Created:
2016-12-11 08:35:09 UTC
Size:
460 bytes
patch
obsolete
>diff --git a/getopt.1 b/getopt.1 >index dda86a5..1998609 100755 >--- a/getopt.1 >+++ b/getopt.1 >@@ -58,11 +58,10 @@ if [ $? -ne 0 ]; then > echo 'Usage: ...' > exit 2 > fi >-set \-\- $args > # You cannot use the set command with a backquoted getopt directly, > # since the exit code from getopt would be shadowed by those of set, > # which is zero by definition. >-while :; do >+for a in $args; do > case "$1" in > \-a|\-b) > echo "flag $1 set"; sflags="${1#-}$sflags"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 215207
: 177862