title: Bash to Ruby - Obtain a list with whois and grep command
body: <p>I'm curious if there's a simple way to convert a bash command into a ruby script.</p>
  
  <p>If you type this in your command line, you'll get a list of ip networks.</p>
  
  <pre><code>whois -h whois.radb.net -- '-i origin AS35995' | grep -Eo "([0-9.]+){4}/[0-9]+"
  </code></pre>
  
  <p>Is there an easy way to do something similar in Ruby, or do I have to manually code that?</p>
  
  <p>Sorry for the noob question and thanks in advance for any help!</p>