Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #1493
| Newsgroups | comp.lang.awk, comp.os.linux.misc |
|---|---|
| From | Geoff Clare <geoff@clare.See-My-Signature.invalid> |
| Subject | Re: Re (2): Can awk use `grep`? |
| References | <iu7414$bnp$1@speranza.aioe.org> <iu7sa1$3un$1@dont-email.me> <slrnj0g6qm.3ft.bill@lat.localnet> <pf7md8-1i8.ln1@leafnode-msgid.gclare.org.uk> <iu9sep$t8t$1@news.xmission.com> |
| Date | 2011-06-28 13:30 +0100 |
| Message-ID | <v3uod8-7q2.ln1@leafnode-msgid.gclare.org.uk> (permalink) |
| Organization | Zen Internet |
Cross-posted to 2 groups.
Kenny McCormack wrote: > Geoff Clare <geoff@clare.See-My-Signature.invalid> wrote: >>Bill Marcum wrote: >> >>> By the way, NR==FNR is true while reading the first file in a list. >> >>Nit-pick: NR==FNR is true while reading the first *non-empty* file. > > The point being that it (NR==FNR) is a kludge for what is really intended > (which is: Is this the first file? Or, more generally: which file is this?) > > What people *should* do is "man up" and accept that we are all using GAWK > (and if we're not, we should be) and use ARGIND as it was intended to be > used. Using the kludge for the sake of compatibility with old, broken AWKs, > is stupid (IMHO, of course...) Personally, I try to stick to what POSIX guarantees, and avoid using extensions in any version of awk. BTW I'm reading this thread in comp.lang.awk. Those reading in comp.os.linux.misc might be less concerned about portability and therefore more inclined to use extensions. However, I have come across Linux systems in the past where "awk" was mawk, not gawk, so if you use gawk extensions make sure you use the name gawk to run it, not just "awk". -- Geoff Clare <netnews@gclare.org.uk>
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re (2): Can awk use `grep`? no.top.post@gmail.com - 2011-06-26 18:03 +0000
Re: Re (2): Can awk use `grep`? Bill Marcum <bill@lat.localnet> - 2011-06-27 01:55 -0400
Re: Re (2): Can awk use `grep`? Geoff Clare <geoff@clare.See-My-Signature.invalid> - 2011-06-27 12:51 +0100
Re: Re (2): Can awk use `grep`? gazelle@shell.xmission.com (Kenny McCormack) - 2011-06-27 12:18 +0000
Re: Re (2): Can awk use `grep`? Geoff Clare <geoff@clare.See-My-Signature.invalid> - 2011-06-28 13:30 +0100
Re (3): Can awk use `grep`? no.top.post@gmail.com - 2011-06-28 03:24 +0000
Re: Re (2): Can awk use `grep`? Loki Harfagr <l0k1@thedarkdesign.free.fr.INVALID> - 2011-06-27 07:18 +0000
Re: Re (2): Can awk use `grep`? Janis Papanagnou <janis_papanagnou@hotmail.com> - 2011-06-27 22:02 +0200
Re (3): Can awk use `grep`? no.top.post@gmail.com - 2011-07-05 17:34 +0000
csiph-web