From: mgarriss Date: 2003-08-26T03:13:51+09:00 Subject: Re: Ruby launching system apps? Dan wrote: >I have a UNIX machine and I want a ruby app that can launch UNIX commands >like awk or sed...how would I implement this? > >use Shell.new? > > `cat some_file` # returns string of stdout system 'cat some_file' # returns success (true/false) exec 'cat some_file' # replaces current process popen 'cat some_file' # returns IO object connected to stdin and stdout require 'open3' Open3.popen3 'cat some_file' # returns [in,out,err]