From owner-freebsd-doc@FreeBSD.ORG Thu May 5 10:00:28 2005 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBDDD16A4CE for ; Thu, 5 May 2005 10:00:28 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7B8243DBE for ; Thu, 5 May 2005 10:00:28 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j45A0QjH084365 for ; Thu, 5 May 2005 10:00:26 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j45A0Qe7084364; Thu, 5 May 2005 10:00:26 GMT (envelope-from gnats) Date: Thu, 5 May 2005 10:00:26 GMT Message-Id: <200505051000.j45A0Qe7084364@freefall.freebsd.org> To: freebsd-doc@FreeBSD.org From: Giorgos Keramidas Subject: Re: docs/80650: Wrong sed arguments in command for CRLF->LF conversion in porters-handbook X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Giorgos Keramidas List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2005 10:00:29 -0000 The following reply was made to PR docs/80650; it has been noted by GNATS. From: Giorgos Keramidas To: Vasil Dimov Cc: bug-followup@freebsd.org Subject: Re: docs/80650: Wrong sed arguments in command for CRLF->LF conversion in porters-handbook Date: Thu, 5 May 2005 12:57:55 +0300 On 2005-05-05 12:26, Vasil Dimov wrote: > The command given in the "4.4 Patching" chapter of the > porters-handbook as a way to convert CRLF line endings > (dos format) to LF (unix) uses sed's -e argument when > it is not needed (only one sed command) and misses -E > argument when it is needed to interpret the regexp as > an extended regular expression. > --- en_US.ISO8859-1/books/porters-handbook/book.sgml.orig Thu May 5 12:18:55 2005 > +++ en_US.ISO8859-1/books/porters-handbook/book.sgml Thu May 5 12:19:01 2005 > @@ -694,7 +694,7 @@ > > post-extract: > @${FIND} -E ${WRKDIR} -type f -iregex ".*\.(c|cpp|h|txt)" -print0 | \ > - ${XARGS} -0 ${REINPLACE_CMD} -e 's/[[:cntrl:]]*$$//' > + ${XARGS} -0 ${REINPLACE_CMD} -E 's/[[:cntrl:]]*$$//' This is not an extended RE and, in my opinion, it's better to be safe than sorry. We are using a long and somewhat complex command as an example, which some Unix newcomers may find instructive. In this case, I vote for clarity instead of the dubious brevity we get by deleting just a short single-letter option :-)