bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SLES12: awk hat Probleme mit bestimmtem Dateinamen


From: Ulrich Windl
Subject: SLES12: awk hat Probleme mit bestimmtem Dateinamen
Date: Wed, 15 Jul 2020 15:59:45 +0200

This is a bug report/feature request for GNU Awk 4.1.0, API: 1.0:

The issue basically is: "when is a filename considered to be a variable 
assignment?"
The manual basically says: "If a filename on the command line has the form 
var=val it is treated as a  variable  assignment."

I had the problem that awk did read from stdin when it was expected to read the 
file "cn=config/olcDatabase={1}hdb.ldif".
Agreed, it's an odd file name.

Using option --lint did not bring any kind of warning, but when using 
"./cn=config/olcDatabase={1}hdb.ldif" as file parameter instead, awk red the 
file.

So I see three possible options:
1) Improve the documentation when a filename is treated as variable assignment. 
Specifically add a note for option "-v" that the "-v" is actually optional. 
Also note that a name containing a '=' anywhere makes it a variable assignment, 
while a name starting with "./" is not a variable assignment (obviously).
2) Improve --lint to add a warning like "parameter is treated as variable 
assignment"
3) Generally emit a warning of a variable assignment is done withoput option 
"-v"






reply via email to

[Prev in Thread] Current Thread [Next in Thread]