From: Paul Mena Date: 2012-12-15T03:15:42+09:00 Subject: Invoking bash from Ruby I'm a novice at Ruby, although I've been introduced to its syntax by virtue of working with Puppet for the past 2 1/2 years. As a sys admin, I'm most comfortable working with bash, but I recognize that there are things that a scripting language can't do - like interacting with a database. So I'm writing some Ruby code to extract text out of an HTML file and then insert it into a mySQL database. I've been using Nokogiri to get some formatted text, but also need to get some text that's easy enough to get with a scripting language like bash. Specifically, I need to do this: grep "Date:" $1 | cut -d' ' -f3-5 Is there an easy way to embed this logic within Ruby code - or, better yet - a way to do the same thing in Ruby? -- Posted via http://www.ruby-forum.com/.