- attached patch-getopt
set -i option without argument wongly handle next option as argument
Issue #254
resolved
NG
$ cat aaa >test.txt $ sed -i -e ‘s/aaa/bbb’ text.txt bbb $ ls test.txt test.txt-e $ cat test.txt
OK
$ cat aaa >test.txt $ sed -i -e ‘s/aaa/bbb’ text.txt $ ls test.txt $ cat test.txt bbb
there’s getopt(3) compatibility issue, GNU’s getopt can treat tri-state:
- no_argument … getopt(“i”)
- require_argument … getopt(“i:”)
- optional_argumemt … getopt(“i::”)
but our traditional getopt(3) doesn’t support this fearture.
TNF HEAD has this feature, see attached patch.
Comments (5)
-
reporter -
reporter - edited description
-
reporter - changed status to resolved
BUGFIX: Issue
#254- getopt(3) support GNU's extention of optional argument "::"→ <<cset bfea0445c966>>
-
reporter BUGFIX: Issue
#254- sed -i/-I argument is not require but optional→ <<cset 3f4c5a15571c>>
-
reporter BUGFIX: Issue
#254- sed -i/-I argument is not require but optional→ <<cset 3b32bc4c61ee>>
- Log in to comment