ITADN

awk needlessly dies when a variable is assigned with embedded newline

#258Closedax672d61 创建于 2025-07-25
A
ax672d61commented
Was sent here in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284654 ; from there ... ``` 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. [...] 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 ``` awk should not die when it encounters a newline in a variable.
关闭于 2025-07-26 1 条评论