From: John Gabriele Date: 2006-05-03T01:38:31+09:00 Subject: Re: Calling Shell Scripts from Ruby ? On 5/2/06, Dinesh Umanath wrote: > Hi all, > > I have two questions > > 1)Is it possible to call "Shell Scripts" from ruby? Say if i have a > shell sciprt named "test.sh", how can i call this from ruby? system( "/path/to/test.sh" ) See: ri Kernel#system > Also if i > can call like that,is it possible to get the output of that script > passed back to ruby? foo = `./test.sh` # Don't forget to chomp what gets stored in foo. > 2)How can i call any "Unix command" residing from a ruby program?? "Unix commands" and your scripts are the same kind of animal: bar = `date` > > Thank You > Dinesh > Note, if you want your script to be able to chit chat with the external process it's running, you'll want to look at IO.popen.