[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
command line variable assignments
From: |
Tom Lord |
Subject: |
command line variable assignments |
Date: |
Thu, 16 May 2002 02:06:32 -0700 (PDT) |
Versions 3.0.3 and 3.0.6 both seem to think that an "=" in a
command line argument indicates a variable assignment rather
than a filename. As I read the spec, this is so only if the
text to the left of the "=" begins with an underscore or letter and
contains only characters which are valid in identifiers -- otherwise
the argument must be treated as a filename.
In other words:
./gawk [....] /foo/bar/=dir/etc
is not a syntax error or bad variable assignment -- it tells awk to
read its input from the named file.
The problem seems to be caused by calling `main.c(arg_assign)' in
`io.c(nextfile)'. `arg_assign' applies a check suitable for `-v'
option arguments, but not for ordinary arguments.
-t
- command line variable assignments,
Tom Lord <=