title: Merits of Bash Script v. Python Script for Shell-Command-Heavy Utility
body: <p>I need to write a script to do the following:</p>
  
  <ol>
  <li>Monitor a queuing system, which is accessible by shell commands.</li>
  <li>Create directories from templates using a mix of inline text editing, cp/mv, command line scripts, and compiled c++ programs.</li>
  <li>Check for error conditions.</li>
  <li>Write files on error conditions.</li>
  </ol>
  
  <p>Note: 2D arrays would be mildly useful to my program, but I'm currently making due with several 1D arrays (due to the limitations of Bash script's arrays).</p>
  
  <p>Those tasks all seems somewhat "shell heavy" in so much as it can easily be implemented with a bunch of shell commands, so I thought Bash scripting would be a natural way to go.  My results thus far have been good, but before I begin refactoring and finalizing my code, I was wondering whether it'd be better to port it to Python.  I've read in numerous places that Python is "superior" to bash.  I've done a bit of Python scripting and as far as I can tell, that's because it has more built in libraries and has support for object-oriented programming.  However, all the scripts I've seen using shell commands, such as this one:
  <a href="http://magazine.redhat.com/2008/02/07/python-for-bash-scripters-a-well-kept-secret/" rel="noreferrer">http://magazine.redhat.com/2008/02/07/python-for-bash-scripters-a-well-kept-secret/</a></p>
  
  <p>Implement obnoxious syntax, like having to define commands as variables, like so:</p>
  
  <pre><code>#You could add another bash command here
  #HOLDING_SPOT="""fake_command"""
  
  #Determines Home Directory Usage in Gigs
  HOMEDIR_USAGE = """
  du -sh $HOME | cut -f1
  """
  
  #Determines IP Address
  IPADDR = """
  /sbin/ifconfig -a | awk '/(cast)/ { print $2 }' | cut -d':' -f2 | head -1
  """
  </code></pre>
  
  <p>...and requiring wrapper functions and other fun.</p>
  
  <p>Am I just being silly or does that seem less intuitive?  Is there a speed advantage for use with Python that would outweigh the simplicity advantage of Bash when it comes to shell script commands?  Or is the syntax of bash (no 2D arrays, brace/parentheses intricacies) reason to jump to Python?</p>