title: using bash to get revision number from subversion
body: <p>I want to write a shell script in bash to deploy websites from an svn repository. When I deploy a website, I name the exported directory <em>website_name</em>-R<em>revision_number</em>. I'd like the bash script to automatically rename the exported directory, so it needs to learn the current revision number from the export directory. If I run </p>
  
  <pre><code>$&gt; svn info http://svn-repository/trunk
  
  Path: trunk
  URL: http://svn-repository/mystery/trunk
  Repository Root: http://svn-repository/mystery
  Repository UUID: b809e6ab-5153-0410-a985-ac99030dffe6
  Revision: 624
  Node Kind: directory
  Last Changed Author: author
  Last Changed Rev: 624
  Last Changed Date: 2010-02-19 15:48:16 -0500 (Fri, 19 Feb 2010)
  </code></pre>
  
  <p>The number after the string <code>Revision:</code> is what I want. How do I get that into a bash variable? Do I do string parsing of the output from the <code>svn info</code> command?</p>