summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2012-02-01 14:10:13 +0000
committerUrban Müller2012-02-01 14:10:13 +0000
commitf119638daa4df426a194e2e83eb754dad3d68550 (patch)
treeb008b9ed59328bb586a821b16edb991d2cc8f817
parent42ab3d58e5bbb624ffe57732c153bf20ae6d6e09 (diff)
downloaditools-f119638daa4df426a194e2e83eb754dad3d68550.tar.gz
itools-f119638daa4df426a194e2e83eb754dad3d68550.tar.bz2
itools-f119638daa4df426a194e2e83eb754dad3d68550.zip
it::pipe docs
-rw-r--r--it.class5
1 files changed, 5 insertions, 0 deletions
diff --git a/it.class b/it.class
index d6bd7a5..4d6d875 100644
--- a/it.class
+++ b/it.class
@@ -840,6 +840,11 @@ function cat($fn = null)
return new it_pipe(array('fn' => $fn));
}
+/**
+ * Create an it_pipe from a command or a lines array
+ * @param $cmd command to execute, or if it is an array, the lines to use
+ * @param $args named arguments to fill into cmd. see it::exec for usage
+ */
function pipe($cmd, $args = array())
{
return new it_pipe(is_string($cmd) ? array('cmd' => $cmd, 'args' => $args) : array('data' => $cmd));