Xref: utzoo news.software.b:4840 unix-pc.general:5527 Path: utzoo!utstat!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!samsung!usc!elroy.jpl.nasa.gov!ucla-cs!twinsun!eggert From: eggert@twinsun.com (Paul Eggert) Newsgroups: news.software.b,unix-pc.general Subject: Re: cnews on a 3B1 with ksh Message-ID: <1990May25.211219.8405@twinsun.com> Date: 25 May 90 21:12:19 GMT References: <1990May22.212714.6570@bagend.uucp> <1990May23.190938.16011@shibaya.lonestar.org> Sender: usenet@twinsun.com Organization: Twin Sun, Inc Lines: 17 afc@shibaya.UUCP (Augustine Cano) writes: I encountered the problem too when installing cnews. The culprit is a string in inews called `egreppat'. As it is, with 4 back-slashes, it works with sh. To make it work with ksh, it has to have 2. If you make this change, it will only work with ksh. I assume you mean the following code. egreppat="^(` sed -e 's/[.+*()|[]/\\\\&/g' -e 's/,/|/g' <$nglist `) " Why not just rewrite it as follows? This should work with both sh and ksh. sedscript='s/[.+*()|[]/\\&/g; s/,/|/g' grouppat=` sed "$sedscript" <$nglist ` egreppat="^($grouppat) "