From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <52727C23.8070302@gmx.de> References: <526FE8DB.5040709@gmx.de> <52727C23.8070302@gmx.de> Date: Thu, 31 Oct 2013 20:24:59 +0100 Message-ID: From: Rudolf Sykora To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] acme/sam language question Topicbox-Message-UUID: 8924bf2a-ead8-11e9-9d60-3106f5b1d025 On 31 October 2013 16:49, Friedrich Psiorz wrote: > It works for me, but I found another inconsistency. > > I tried it on p9p and 9vx, both in acme and sam. >>>> /A/+#0;/B/-#0 >>>> g/CC/ s/CC/DD/g >>>> p Well. If I use these commands one by one inside p9p acme (and probably sam, too), I truly get what I want (and what you say). The problem appears when I want to run it from a script like this: sam -d <[2] /dev/null /A/+#0;/B/-#0 g/CC/ s/CC/DD/g p EOF then you get, since the g is on a seperate line, an extra output from the line before g. And if you try to join g with the match like sam -d <[2] /dev/null /A/+#0;/B/-#0 g/CC/ s/CC/DD/g p EOF then you get no output if CC is not between A and B (although when it is there, you get what I want). In neither case I am fully satisfied. :) Thanks Ruda