[Bug 12776] New: $@ containing quoted string is split into separate arguments
bugzilla at busybox.net
bugzilla at busybox.net
Thu Apr 16 10:55:02 UTC 2020
https://bugs.busybox.net/show_bug.cgi?id=12776
Bug ID: 12776
Summary: $@ containing quoted string is split into separate
arguments
Product: Busybox
Version: 1.31.x
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Standard Compliance
Assignee: unassigned at busybox.net
Reporter: marius at psihoexpert.ro
CC: busybox-cvs at busybox.net
Target Milestone: ---
My system is a router (arm-brcm-uclibcgnueabi, armv7l) running kernel 2.26 and
busybox v1.31.1 (entware package)
To demonstrate this bug, create a file script.sh with this contents:
#!/bin/sh
for ARG in $@ ; do echo $ARG ; done
Execute it like this:
./script.sh arg0 "arg1a arg1b" 'arg2a arg2b'
Expected output:
arg0
arg1a arg1b
arg2a arg2b
Real ouput:
arg0
arg1a
arg1b
arg2a
arg2b
See this standard:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_02
>From what I understand, field splitting should not occur inside double quotes.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list