( Cmd("grep foo") < Stdio.File("foo.txt") | Cmd("uniq") > mysocket ) ->run();
Oh, this is some nice looking syntax. Or, if you wish, it makes Pike look like a shell script. It would probably make some external command calling easier however, and it wouldn't require using actual shell syntax.
/ David Hedbor
Previous text:
2003-09-22 22:53: Subject: wish: string with other quoting then \
Why not use operator overloading?
( Rx.Rx("[ \t\n\r\f\v]") | Rx.Rx("//[^\n]*\n") | Rx.Rx("/\*([^*]|\*[^/])*\*/") ) * Rx.inf
Btw, I tried doing this to emulate pipes recently, and found out that I can't make an `< operator which returns an object.. Kind of annoying as I wasn't planning to use `< for comparisons.
I was trying to do something like:
( Cmd("grep foo") < Stdio.File("foo.txt") | Cmd("uniq") > mysocket ) ->run();
Any ideas for how to get around the type restrictions in `< and other lfuns?
/ Fredrik (Naranek) Hubinette (Real Build Master)