Mack wrote:
This is a lot of work to do what
BEGIN { RS = "\r?\n" }
would do. Even simpler would be to put
tr -d '\r'
as a stage in your pipleine before calling gawk.
Mack
A few comments:
1) As noted, I don't like changing RS. So, for me, I was looking for
something better. Note also that if you actually want to do something
fancy with RS (other than fixing the DOS line terminator problem), then
it is nice to not have to do both in RS.
2) I have also used the "tr -d" method; again, not a good overall fit to my
development ecosystem.
3) The C source code looks more complicated than it is. In fact, only a
few lines of it are non-boilerplate. Once you've done one, it is
pretty easy to write new ones. In fact, I only spent about 15 minutes
changing the previous Input Parser to generate the new one. All you
need to do is one global-search-and-replace to change all the names and
then you write a few (about 10) lines of new code to do what you want
it to do.
Anyway, it is what it is. Use it or don't use it. Makes no difference to me.
--
Just for a change of pace, this sig is *not* an obscure reference to comp.lang.c...
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)