Date: Thu, 5 May 2005 12:26:32 +0300 From: Vasil Dimov <vd@datamax.bg> To: FreeBSD-gnats-submit@FreeBSD.org Subject: docs/80650: Wrong sed arguments in command for CRLF->LF conversion in porters-handbook Message-ID: <20050505092632.GA15619@sinanica.bg.datamax> Resent-Message-ID: <200505050930.j459U289082491@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 80650 >Category: docs >Synopsis: Wrong sed arguments in command for CRLF->LF conversion in porters-handbook >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Thu May 05 09:30:02 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Vasil Dimov >Release: FreeBSD 5.4-STABLE i386 >Organization: DataMax >Environment: System: FreeBSD sinanica.bg.datamax 5.4-STABLE FreeBSD 5.4-STABLE #5: Mon Apr 11 14:07:32 EEST 2005 root@sinanica.bg.datamax:/usr/obj/usr/src/sys/SINANICA-SMP i386 >Description: 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. NOTE: this patch assumes patch from docs/80649 is already applied. >How-To-Repeat: >Fix: --- 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:]]*$$//'</programlisting> + ${XARGS} -0 ${REINPLACE_CMD} -E 's/[[:cntrl:]]*$$//'</programlisting> <para>Of course, if you need to process each and every file, <option>-iregex</option> above can be omitted. Be aware that this >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050505092632.GA15619>