>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 [email protected]:/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:
[garrc...@garrcoop-fbsd /usr/home/garrcoop]$ sed -i "" -e 's/games:/d' /etc/passwd sed: 1: "s/games:/d ": unescaped newline inside substitute pattern [garrc...@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: _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "[email protected]"
