From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <8e5fcb8f889c1405c825c078261d2d88@brasstown.quanstro.net> References: <8e5fcb8f889c1405c825c078261d2d88@brasstown.quanstro.net> Date: Sat, 13 Mar 2010 18:14:13 +0100 Message-ID: From: Rudolf Sykora To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] watching plumber Topicbox-Message-UUID: e7da607c-ead5-11e9-9d60-3106f5b1d025 > why are you executing a rule instead of directly plumbing to edit? > i'm not sure all of the wheres and whys of what you're doing, but > it smells too complicated. =A0also, using annoying characters like > '[' and '] in filenames is complicating matters. I'm executing a rule since I really need to prepare the stuff. Actually it's not 'cat' I want to execute, but grep: type is text data matches '[^{}]+' data matches '(figs/([a-zA-Z0-9[\].-_]*/)*)([a-zA-Z0-9.-_]+)' arg isdir $1 plumb start 9 grep $3 /home/ruda/CALC/manu/$1_source | plumb -i -d edit -a action=3Dshowdata and even in this a step is missing (I started with simple rule and complicate it step by step, checking it works). The final rule should be sth. like plumb start grep $3 /home/ruda/CALC/manu/$1/_source | sed -e 's/\.eps/.g/' | plumb -i -d edit but I am not there yet. Similarly to the problem with 'cat' now I am getting (with the last but one rule): ;/home/ruda/CALC/manu/figs/4Co4Ni4Co/_source:/home/ruda/CALC/systems/co4ni4= co4_264_fcc001/rotxy/Cxy.eps grep: can't open |: No such file or directory grep: can't open plumb: No such file or directory grep: can't open -i: No such file or directory grep: can't open -d: No such file or directory grep: can't open edit: No such file or directory grep: can't open -a: No such file or directory grep: can't open action=3Dshowdata: No such file or directory as if the rule was sending all stuff to grep as arguments... Yes, the [ ] characters are annoying... but now it's not them causing the problem, they are not present now. And yes, it perhaps is fairly complicated, but it can help me a bit if working. It'd be just my personal rule... I think the thing with arguments (i.e why everything is considered an argument to grep in the last example), is the last problem on my way. and the [ ] characters ... I may get rid of them in the future for some other unicode characters which could serve the purpose of brackets. Thanks Ruda