Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Apr 2002 19:50:11 -0700 (MST)
From:      Warren Block <wblock@wonkity.com>
To:        Peter Leftwich <Hostmaster@Video2Video.Com>
Cc:        FreeBSD Questions <FreeBSD-Questions@FreeBSD.Org>
Subject:   Re: special charaters (return key)
Message-ID:  <Pine.BSF.4.21.0204031941590.77027-100000@wonkity.com>
In-Reply-To: <20020403203320.X70185-100000@earl-grey.cloud9.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 3 Apr 2002, Peter Leftwich wrote:

> On Wed, 3 Apr 2002, Warren Block wrote:
> > perl -pi -e 's/\r//g' crt1.txt
> 
> This was going to be part of my suggested rememdy (i.e. to use perl) but it
> seemed too complex.  The manpage for "perl" doesn't mention -pi nor does it
> mention -e; Could you explain what this command does?  I think there should
> be a simple command to change a file into one long line :)

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.

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




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?Pine.BSF.4.21.0204031941590.77027-100000>