From owner-freebsd-chat Fri Jun 22 21:35:14 2001 Delivered-To: freebsd-chat@freebsd.org Received: from falcon.mail.pas.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by hub.freebsd.org (Postfix) with ESMTP id 2B43A37B401 for ; Fri, 22 Jun 2001 21:35:12 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from mindspring.com (dialup-209.245.143.225.Dial1.SanJose1.Level3.net [209.245.143.225]) by falcon.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id VAA23797; Fri, 22 Jun 2001 21:34:03 -0700 (PDT) Message-ID: <3B341C5C.5D17EBAB@mindspring.com> Date: Fri, 22 Jun 2001 21:34:36 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Dag-Erling Smorgrav Cc: Anton Berezin , Mike Meyer , Terry Lambert , j mckitrick , freebsd-chat@FreeBSD.ORG Subject: Re: most complex code in BSD? References: <200106222110.OAA28427@usr06.primenet.com> <20010622232942.A53155@heechee.tobez.org> <15155.47930.698005.428088@guru.mired.org> <20010622234325.B53155@heechee.tobez.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Dag-Erling Smorgrav wrote: > Anton Berezin writes: > > perl -pe 's,.,,sg if $_{+lc}++' out > > > > Like this, you mean? ;-) > > This is perfectly understandable. It copies its input less any > duplicate lines (even if they don't immediately follow the first > occurrence - uniq(1) can't do this). Intentionally and naievely reading this as a 'vi', 'ed', 'sed', or 'awk' user, I'd say it copies its input to its output, replacing periods with nothing for the entirety of each input line... The problem is that you can't be certain everyone is using the same Captain Midnight Secret Decoder Ring(tm) that you happen to be using. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message