Skip to content

tsalzer/syscmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple wrapper to execute system commands, which provides stdout, stderr and exit code.

require 'syscmd'
cmd = Syscmd.exec!('command')  # => Syscmd::Command object

cmd.stdout                     # => String
cmd.stderr                     # => String
cmd.exitcode                   # => Integer

Note that Syscmd.exec! immediately executes the given command. You will get the Syscmd::Command object executed and can examine it.

The Syscmd::popen code is mostly taken from the original Ruby 1.8 implementation of Open3::open3 (author: Yukihiro Matsumoto: documentation: Konrad Meyer).

Copyright © 2009 Till Salzer. See LICENSE for details.

About

A simple wrapper to execute system commands, which provides stdout, stderr and exit code.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages