On Wed, Aug 28, 2013 at 5:13 AM, dexen deVries wrote:
> your selection lacks the final LF to make Rc happy ;-)
>
> a quick and dirty hack would be to always append LF:
> exec /usr/local/plan9/bin/rc <{9p read acme/$id/rdsel;echo;}
>
> tested with:
> echo foo bar
> rc <{9p read acme/$winid/rdsel; e
On 28 August 2013 14:13, dexen deVries wrote:
> your selection lacks the final LF to make Rc happy ;-)
>
> a quick and dirty hack would be to always append LF:
> exec /usr/local/plan9/bin/rc <{9p read acme/$id/rdsel;echo;}
>
> tested with:
> echo foo bar
> rc <{9p read acme/$winid/rdsel; echo; }
On Wednesday 28 of August 2013 10:05:14 Rudolf Sykora wrote:
> Hello,
>
> I tried to modify Russ' script below to be usable on p9p. I came up with
>
> #!/usr/local/plan9/bin/rc
>
> if(! ~ $#* 1) {
> echo 'usage: Run title' >[1=2]
> exit 1
> }
>
Hello,
I tried to modify Russ' script below to be usable on p9p. I came up with
#!/usr/local/plan9/bin/rc
if(! ~ $#* 1) {
echo 'usage: Run title' >[1=2]
exit 1
}
id=`{awk -v 'pat='$1 '$6 ~ pat {print $1}' <{9p read acme/index}}
if(~ $#id 0) {
> See http://swtch.com/~rsc/acme-Run.png for an illustration.
>
> Russ
Thank you much!
This is what I need and now I see how it can be achieved...
:)
Ruda
On Mon, Jun 8, 2009 at 2:15 PM, Russ Cox wrote:
> The script below implements this usage; I called it Run.
> You can type and select your command in one window, with a name matching
> pattern, and then in the other window's tag execute >Run pattern.
> Run finds the window with a title matching patt
> well, though an inspiring idea, it doesn't sound to be much practical:
> 1) I usually have a special window in which I have many commands. I
> then select the one needed and chord it to the appropriate window
> (i.e. I don't use the whole contents of a window).
> 2) sometimes I have more such win
> and you want somebody do look through the code and figure it out for you?
not really. I wanted to know whether
1) somebody thought about it (knowing the system has been around for
some time I'd expect somebody must have had the same problem)
2) there is any good reason why it behaves so.
Ruda
2009/6/8 Rudolf Sykora :
> The very question for me now is: why it behaves how it behaves, i.e
> why newlines (if it's them) are problematic.
>
> Ruda
>
They are the only way Edit has to separate commands. You will notice
that you cannot use something like i/A/a/W/ (or i/A/;a/W/, for
example). How
> The very question for me now is: why it behaves how it behaves, i.e
> why newlines (if it's them) are problematic.
and you want somebody do look through the code and figure it out for you?
> remember, this is plan9 and everything is a file. chances are your
> "script" is already available in some filesystem and you don't need to
> write it out:: create a new window inside acme, type your awk script
> and then issue ">awk -f /mnt/wsys/X/body" where X is the ID of your
> window.
well,
> well, I hoped this would be the last way... It makes me create files I
> don't actually need.
remember, this is plan9 and everything is a file. chances are your
"script" is already available in some filesystem and you don't need to
write it out:: create a new window inside acme, type your awk sc
> Put the awk code into a file and execute '> awk -f foo' in acme.
well, I hoped this would be the last way... It makes me create files I
don't actually need.
Is it the newlines that causes troubles?
Thanks
Ruda
But what shall I do when the awk script is more complicated, in the
simplest case
Put the awk code into a file and execute '> awk -f foo' in acme.
Hello everyone,
when I want to process a dot's contents in acme I can use the '>' syntax, e.g.
have
> awk '{print}'
in a window, select it, and then 2-1 click on Edit in the window with
my dot. That works.
But what shall I do when the awk script is more complicated, in the
simplest case like
>
15 matches
Mail list logo