Date: Wed, 3 Mar 2010 07:31:56 GMT From: Garrett Cooper <gcooper@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/144441: Confusing error message from sed with 's/.*/d' ": unescaped newline inside substitute pattern Message-ID: <201003030731.o237VuPX036455@www.freebsd.org> Resent-Message-ID: <201003030740.o237e1Ad068464@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 144441 >Category: bin >Synopsis: Confusing error message from sed with 's/.*/d' ": unescaped newline inside substitute pattern >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Mar 03 07:40:01 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Garrett Cooper >Release: RELENG_8 >Organization: Cisco Systems, Inc >Environment: FreeBSD garrcoop-fbsd.cisco.com 8.0-STABLE FreeBSD 8.0-STABLE #2: Wed Feb 3 16:57:07 PST 2010 garrcoop@garrcoop-fbsd.cisco.com:/usr/obj/usr/src/sys/LAPPY_X86 i386 >Description: I accidentally misread a web document and thus provided incorrect input to sed. BSD sed failed with a confusing message, but GNU sed led me on to the right track: [garrcoop@garrcoop-fbsd /usr/home/garrcoop]$ sed -i "" -e 's/games:/d' /etc/passwd sed: 1: "s/games:/d ": unescaped newline inside substitute pattern [garrcoop@garrcoop-fbsd /usr/home/garrcoop]$ sed -i "" -e '/games:/d' /etc/passwd sed: /etc/passwd: Permission denied I'm confused where the newline is coming into play. >How-To-Repeat: sed 's/games:/d' /etc/passwd >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003030731.o237VuPX036455>