Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > alt.folklore.computers > #227724
| From | cross@spitfire.i.gajendra.net (Dan Cross) |
|---|---|
| Newsgroups | alt.folklore.computers |
| Subject | Re: The joy of perl |
| Date | 2024-10-10 12:49 +0000 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <ve8igg$sk2$1@reader1.panix.com> (permalink) |
| References | <pan$96411$d204da43$cc34bb91$1fe98651@linux.rocks> <ve62b8$2lt0n$1@dont-email.me> <awk-20241009150450@ram.dialup.fu-berlin.de> <9ftktk-o0l.ln1@ID-313840.user.individual.net> |
In article <9ftktk-o0l.ln1@ID-313840.user.individual.net>,
Geoff Clare <netnews@gclare.org.uk> wrote:
>Stefan Ram wrote:
>
>> awk '{if ($0 in s){}else print;s[$0]=1;}'
>
>awk '!($0 in s);{s[$0]=1}'
People don't like it because of the increment, but:
awk '!a[$0]++'
is about as short as one can get.
- Dan C.
Back to alt.folklore.computers | Previous | Next — Previous in thread | Next in thread | Find similar
Re: The joy of FORTRAN lar3ryca <larry@invalid.ca> - 2024-10-08 19:53 -0600
Re: The joy of Python Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-10-09 05:46 +0000
Re: The joy of Python p.dean@invalid.net (Peter Dean) - 2024-10-09 07:12 +0000
Re: The joy of Python "Kerr-Mudd, John" <admin@127.0.0.1> - 2024-10-09 09:27 +0100
Re: The joy of Python lar3ryca <larry@invalid.ca> - 2024-10-09 21:42 -0600
Re: The joy of Python p.dean@invalid.net (Peter Dean) - 2024-10-10 04:39 +0000
Re: The joy of perl p.dean@invalid.net (Peter Dean) - 2024-10-09 14:01 +0000
Re: The joy of awk p.dean@invalid.net (Peter Dean) - 2024-10-09 15:32 +0000
Re: The joy of awk "Kerr-Mudd, John" <admin@127.0.0.1> - 2024-10-11 09:25 +0100
Re: The joy of awk John Ames <commodorejohn@gmail.com> - 2024-10-11 07:55 -0700
Re: The joy of awk Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2024-10-11 17:59 +0000
Re: The joy of perl Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-10-10 07:48 +0000
Re: The joy of perl Geoff Clare <geoff@clare.See-My-Signature.invalid> - 2024-10-10 13:21 +0100
Re: The joy of perl cross@spitfire.i.gajendra.net (Dan Cross) - 2024-10-10 12:49 +0000
Re: The joy of perl Geoff Clare <geoff@clare.See-My-Signature.invalid> - 2024-10-10 15:24 +0100
Re: The joy of perl p.dean@invalid.net (Peter Dean) - 2024-10-10 20:27 +0000
csiph-web