Commit fe4aea72 authored by Daniel DeLeo's avatar Daniel DeLeo
Browse files

add an example to the readme

parent d051c467
......@@ -5,6 +5,22 @@ working directory, uid, gid, etc.
No means for passing input to the subprocess is provided.
## Example
Invoke find(1) to search for .rb files:
find ="find . -name '*.rb'")
If all went well, the results are on `stdout`
puts find.stdout
`find(1)` prints diagnostic info to STDERR:
puts "error messages" + find.stderr
Raise an exception if it didn't exit with 0
Run a command as the `www` user with no extra ENV settings from `/tmp`
cmd ="apachectl", "start", :user => 'www', :env => nil, :cwd => '/tmp')
cmd.run_command # etc.
## Platform Support
Mixlib::ShellOut does a standard fork/exec on Unix, and uses the Win32
API on Windows. There is not currently support for JRuby.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment