Date: Sun, 05 Mar 2017 01:39:26 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 217553] [patch] awk(1) assignment arguments do not accept values with a leading '=' Message-ID: <bug-217553-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D217553 Bug ID: 217553 Summary: [patch] awk(1) assignment arguments do not accept values with a leading '=3D' Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Keywords: patch Severity: Affects Some People Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: kdrakehp@zoho.com Keywords: patch Created attachment 180522 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D180522&action= =3Dedit Remove the second '=3D' check in `isclvar'. awk(1) explicitly disallows command-line assignments where the assignment value has a leading '=3D'. This behavior is contrary to the standard, which places no such restriction on assignment values. >From the standard: The characters following the <equals-sign> shall be interpreted as if they appeared in the awk program preceded and followed by a double-quote ('"') character, as a STRING token (see Grammar), except that if the last character is an unescaped <backslash>, it shall be interpreted as a literal <backslash> rather than as the first character of the sequence "\"". How to reproduce: $ awk 'END{print var}' var=3D'=3Dvalue=3D' < /dev/null awk: can't open file var=3D=3Dvalue=3D source line number 1 Expected output: =3Dvalue=3D $ awk -v var=3D'=3Dvalue=3D' 'BEGIN{print var}' awk: invalid -v option argument: var=3D=3D text Expected output: =3Dvalue=3D --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-217553-8>