Hi. I'm trying to add data to say /colrules from withing my custom script in
.wmii-hg. Basicaly I read the old contents into a variable, then printf the
old contents and new contents (minus sort|uniq) into /colrules.
I'm just curious. How stupid is say this idea?
{ wmiir read /colrules; echo '/.*/ -> 100'; } | wmiir write /colrules
Basicaly I'd expect this not to work, since wmiir is reading and at the same
time overwriting the data. It had worked as far as I've tried. Is it because
wmiir first reads all the data and then outputs it so that the other wmiir
write will just overwrite alread read data, or have I been lucky and reading
from the file was just always quicker then writing to it?
Simply put, can I safely use the above syntax or should I read it into a
variable and then overwrite it?
thanks
mk
Received on Wed Mar 18 2009 - 23:16:10 UTC
This archive was generated by hypermail 2.2.0 : Wed Mar 18 2009 - 23:24:06 UTC