[git commit] awk: stop on first non-option, closes 9861
Denys Vlasenko
vda.linux at googlemail.com
Wed Aug 16 17:07:53 UTC 2017
commit: https://git.busybox.net/busybox/commit/?id=a1799db4ac660a15285e1ac2464b5f622746d787
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
editors/awk.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/editors/awk.c b/editors/awk.c
index 372a255..2005329 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -70,7 +70,11 @@
#endif
-#define OPTSTR_AWK \
+/* "+": stop on first non-option:
+ * $ awk 'BEGIN { for(i=1; i<ARGC; ++i) { print i ": " ARGV[i] }}' -argz
+ * 1: -argz
+ */
+#define OPTSTR_AWK "+" \
"F:v:*f:*" \
IF_FEATURE_AWK_GNU_EXTENSIONS("e:*") \
"W:"
More information about the busybox-cvs
mailing list