https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284654
Bug ID: 284654
Summary: awk spits useless warning when a variable is assigned
with embedded newline
Product: Base System
Version: 14.2-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: [email protected]
Reporter: [email protected]
FreeBSD 14.3-RELEASE "awk(1)" v20240422 spits out useless warning when a
variable is assigned a value with embedded new line. So is not the case with
FreeBSD package of GNU awk "5.3.1, API 4.0" or Debian 12 "mawk" version "1.3.4
20200120". The thread: https://freeradical.zone/@ax6761/113959236391782454
Script below show the output of native- & GNU awk's.
input="9
7"
for AWK in \
/usr/bin/awk \
/usr/local/bin/gawk
do
echo ' ---' ; echo
"$AWK" --version
echo | "$AWK" -v arg="$input" '{ print arg }'
done
---
awk version 20240422
/usr/bin/awk: newline in string 9
7... at source line 1
---
GNU Awk 5.3.1, API 4.0
Copyright (C) 1989, 1991-2024 Free Software Foundation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
9
7
--
You are receiving this mail because:
You are the assignee for the bug.