Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Apr 2002 00:42:11 -0500 (EST)
From:      Peter Leftwich <Hostmaster@Video2Video.Com>
To:        Warren Block <wblock@wonkity.com>
Cc:        FreeBSD Questions <FreeBSD-Questions@FreeBSD.Org>
Subject:   Re: special charaters (return key)
Message-ID:  <20020406003533.V68445-100000@earl-grey.cloud9.net>
In-Reply-To: <Pine.BSF.4.21.0204031941590.77027-100000@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 3 Apr 2002, Warren Block wrote:
> > On Wed, 3 Apr 2002, Warren Block wrote:
> > > perl -pi -e 's/\r//g' crt1.txt
> Erik did an excellent job explaining it.  I'll add two other things:
> 1. The "g" flag after the final slash means to substitute all occurrences ("global") instead of just the first one.

This is the same usage for the "sed" command-line command.  Here's the sort
of mnemonic I use to remember it:

sed 's/this/that/g'
_s_tream _ed_itor, 'like _s_ubstitute / this [with] / that / _g_lobally'

(I used to think of the "g" as "_g_ood, now we're done" back in 1994ish.)

> 2. The llama or camel O'Reilly books pay for themselves quickly.  I prefer the first; most of the reference information I need from the camel book is in the man pages.
> -Warren Block * Rapid City, South Dakota USA

Those www.ora.com books are quite pricey, and the catch-22 of it all is you
don't want to wait for the price to drop with time or buy an older used
copy because (except in the case of regexp, for example) the current
applications obsoletize :)

--
Peter Leftwich
President & Founder
Video2Video Services
Box 13692, La Jolla, CA, 92039 USA
+1-413-403-9555


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020406003533.V68445-100000>