summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
Diffstat (limited to 'it.class')
-rw-r--r--it.class10
1 files changed, 10 insertions, 0 deletions
diff --git a/it.class b/it.class
index 26f9dd7..f8c8553 100644
--- a/it.class
+++ b/it.class
@@ -783,6 +783,16 @@ static function file_put($filename, $data, $p = array())
return ($out = fopen($filename == "-" ? "php://stdout" : $filename, "w")) && (fputs($out, $data) === strlen($data)) && fclose($out);
}
+function cat($fn)
+{
+ return new it_pipe(array('fn' => $fn));
+}
+
+function pipe($cmd, $args = array())
+{
+ return new it_pipe(is_string($cmd) ? array('cmd' => $cmd, 'args' => $args) : array('data' => $cmd));
+}
+
}
?>