Date: Wed, 4 Dec 2002 10:32:17 -0600 From: D J Hawkey Jr <hawkeyd@visi.com> To: Jerry McAllister <jerrymc@clunix.cl.msu.edu> Cc: Warren Block <wblock@wonkity.com>, freebsd-questions@FreeBSD.ORG Subject: Re: tool/method to convert DOS line endings to UNIX line endings Message-ID: <20021204103217.A12019@sheol.localdomain> In-Reply-To: <200212041520.gB4FKgD20705@clunix.cl.msu.edu>; from jerrymc@clunix.cl.msu.edu on Wed, Dec 04, 2002 at 10:20:41AM -0500 References: <20021204080104.A56240@sheol.localdomain> <200212041520.gB4FKgD20705@clunix.cl.msu.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Dec 04, at 10:20 AM, Jerry McAllister wrote:
>
> > This'll work though:
> > sed -e 's/[[:cntrl:]]$//g'
> >
> > > > I like the tr(1) conversion too, but I always seem to think in terms of
> > > > sed(1) and awk(1).
> >
> > And if that sed(1) solution is still "too loose", the tr(1) solution reduces
> > "[[:cntrl:]]" to just the CR character.
>
> Just to be clear on this issue; you want to be left with the LF characters
> and get rid of the CR characters not the other way around. I am not a sed
> person, but your statement is backwards even if your sed works.
No, I meant what I wrote, though you gave me pause to double-check. The
"[[:cntrl:]]" and reference to the CR character ("\r" = carriage-return)
are what's being stripped. I pro'lly should have finished the sentence
with "... for stripping." or somesuch.
> ////jerry
Dave
--
______________________ ______________________
\__________________ \ D. J. HAWKEY JR. / __________________/
\________________/\ hawkeyd@visi.com /\________________/
http://www.visi.com/~hawkeyd/
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?20021204103217.A12019>
