title: How do I use Ruby for shell scripting?
body: <p>I have some simple shell scripting tasks that I want to do   </p>
  
  <p>For example: Selecting a file in the working directory from a list of the files matching some regular expression.</p>
  
  <p>I know that I can do this sort of thing using standard bash and grep but I would be nice to be able to hack quick scripts that will work in windows and linux without me having to memorize a heap of command line programs and flags etc.</p>
  
  <p>I tried to get this going but ended up getting confused about where I should be getting information such as a reference to the current directory</p>
  
  <p>So the question is what parts of the Ruby libraries do I need to know to write ruby shell scripts?</p>