Date: Mon, 16 Jan 1995 20:53:32 -0500 From: Thomas David Rivers <ponds!rivers@dg-rtp.dg.com> To: freebsd-bugs@wcarchive.cdrom.com, freebsd-hackers@wcarchive.cdrom.com Subject: Probable bug in /bin/sh (backslash processing again.) Message-ID: <199501170153.UAA19381@ponds.UUCP>
next in thread | raw e-mail | index | archive | help
I just tried to post from my FreeBSD 2.0R machine, using the inews shell script supplied with my ancient version of cnews. Apparently, the newer "sed" acts differently than the older one, which causes inews to not find any newsgroups from /usr/lib/news/active. The offending line in inews looks like: egreppat="^(` sed -e 's/[.+*()|[]/\\\\&/g' -e 's/,/|/g' <$nglist `) " If you set nglist to /tmp/t1, and have a single line in /tmp/t1 which looks like this (no leading space): rec.collecting And then execute the following: egreppat="^(` sed -e 's/[.+*()|[]/\\\\&/g' -e 's/,/|/g' </tmp/t1 `) " echo $egreppat The answer you get is: ^(rec&collecting) Instead of the expected: ^(rec\.collecting) (I've verified that to be the correct result on an HP/UX machine, and a Sun4 with SunOS 4.1.x) This is most likely a bug in /bin/sh backslash processing within quotes. I had tried my hand at fixing the last set of these - but didn't get very far when someone else had already fixed them. Unfortunately, I don't know who that someone was to report this additional problem. - Thanks - - Dave Rivers -
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199501170153.UAA19381>