David Masover wrote: > On Monday, August 16, 2010 07:34:19 am Diego Bernardes wrote: > Now, you might well ask why we don't just wrap these existing binaries > in a > gem. It's not clear that there would be a huge benefit, though. Most of > the > time, properly-engineered Unix binaries also have C libraries, and it's > probably easier and cleaner to write a Ruby binding for a C library than > to > write a Ruby wrapper around a Unix executable -- for one, you don't have > to > deal with escaping commandline arguments or passing text back and forth > through a pipe just to communicate, you've got an actual API to work > with. > Another issue with calling Unix commands is portability. I've finally begun converting my shell scripts to ruby since the parameters and output across unices do not match. e.g. OSX's BSD commands differ *a lot* from the GNU coreutils ones such as 'date', 'expr', and sleep. Anyway, for more of Unix philosophy in ruby, there is a presentation of the "GLI" project - helps to create application with multiple subcommands such as github. http://awesome-cli-ruby.heroku.com/ -- Posted via http://www.ruby-forum.com/.