mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-02 01:20:54 +00:00
f8eeebacaa
shell. Pipes and redirections work just as expected: sh = Shell.cd("/foo") sh.cat("bar") | sh.tee("baz") > "baa" # or sh.transact do cat("bar") | tee("baz") > "baa" end
14 lines
359 B
Plaintext
14 lines
359 B
Plaintext
shell.rb is a Ruby library to run commands and control jobs like a
|
|
shell. Pipes and redirections work just as expected:
|
|
|
|
sh = Shell.cd("/foo")
|
|
|
|
sh.cat("bar") | sh.tee("baz") > "baa"
|
|
# or
|
|
sh.transact do
|
|
cat("bar") | tee("baz") > "baa"
|
|
end
|
|
|
|
Author: Keiju Ishitsuka <keiju@ishitsuka.com>
|
|
WWW: http://www.ruby-lang.org/en/raa-list.rhtml?name=Shell
|