[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Gerd Stolpmann <gerd@g...> |
| Subject: | Announcement: Package Shell |
I've just completed another O'Caml package of general interest: Shell. It
contains everything needed to start commands which are connected by pipelines.
A few examples:
open Shell;;
call [ cmd "ls" [ "/dir1"; "/dir2" ]];;
(* <=> ls /dir1 /dir2 *)
call [ cmd "find" [ "/dir" ]; cmd "grep" [ "something" ] ];;
(* <=> find /dir | grep something *)
let s = "d\na\nc\nb\n" in
let b = Buffer.create 20 in
call ~stdin:(from_string s) ~stdout:(to_buffer b) [ cmd "sort" ];;
(* <=> b=`sort <<_EOF_
$s
_EOF_`*)
For more information, visit the documentation page:
http://www.ocaml-programming.de/packages/documentation/shell/
Gerd
--
----------------------------------------------------------------------------
Gerd Stolpmann Telefon: +49 6151 997705 (privat)
Viktoriastr. 100
64293 Darmstadt EMail: gerd@gerd-stolpmann.de
Germany
----------------------------------------------------------------------------