In article <
19fb97a2-56e9-4fa7...@googlegroups.com>,
Marc:
I was about to give you a "technical" answer to your question - that
is, a typical Unix-y "You could do that" sort of response. I think that it
should be possible to do this in more-or-less straightforward fashion in a
GAWK extension library. However, I then re-thought it, and realized that
this is really a policy question, not a technical one. From a policy
perspective, I think both of the following are legitimate issues:
1) Although I do think it is probably do-able via an extension library
- and I was about to spend a bit of time messing around with it, until I
realized that it's not really a technical question - I don't think it is
possible to do it without, as Dennis Ritchie would have said, getting a
little too cozy with the implementation.
I.e., you'd have to have a reliable (and portable!) way to figure out which
fd (file descriptor) the current file is open on. I can do this with
Linux, pretty reliably, by looking at /proc/<pid>/fd, but that's not going
to work on non-Linux systems. It gets ugly real quick, and you realize
something very important: namely, that although you *could* do this in
"user-space", it'd be a lot better if it were done in implementor-space.
And that's the key: There's a class of problems that, although they
*could* be done in user-(including via extension lib)-space, they be better
done by the implementors. And that's the rub, when the GAWK developers have
clearly and vociferously declared that they won't do it in implementor-space
if it is at all possible for it to be done in user-space.
2) I really, seriously, and sincerely don't understand why this is an
issue for you (you, personally), because I believe that both of the
following are true:
a) You own TAWK (and are quite happy with it).
b) You work on Windows.
So, you should just do your work with TAWK and be happy. Sadly, I don't
use Windows much nowadays, so I don't get to use TAWK as much as I'd like.
From both the features and the performance points-of-view, TAWK is far
and away the best AWK implementation on the planet. I don't understand why
you are at all concerned with GAWK. To be fair, TAWK has 3 negatives,
listed below, but I don't think any of them should affect you.
a) Runs on only two platforms (Windows, Solaris).
b) Is not open source.
c) Is not currently commercially available.
--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain
in compliance with said RFCs, the actual sig can be found at the following URL:
http://user.xmission.com/~gazelle/Sigs/DanaC