mirror of
https://github.com/opnsense/src.git
synced 2026-04-24 15:48:48 -04:00
POSIX requires accepting unquoted newlines in word in parameter expansions
like ${param+word}, ${param#word}, although the Bourne shell did not support
it, it is not commonly used and might make it harder to find a missing
closing brace.
It was also strange that something like
foo="${bar#
}"
was rejected.
Reported by: Martijn Dekker via Robert Elz
7 lines
44 B
Text
7 lines
44 B
Text
# $FreeBSD$
|
|
|
|
a='z
|
|
'
|
|
b="${a%
|
|
}"
|
|
[ "$b" = z ]
|