title: What does [] do in bash?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2188199/bash-double-or-single-bracket-parentheses-curly-braces">bash: double or single bracket, parentheses, curly braces</a>  </p>
  </blockquote>
  
  
  
  <p>Looking at the <code>rc.d</code> cron script in archlinux:</p>
  
  <pre><code>#!/bin/bash
  . /etc/rc.conf
  . /etc/rc.d/functions
  
  name=crond
  . /etc/conf.d/crond
  PID=$(pidof -o %PPID /usr/sbin/crond)
  
  case "$1" in
  start)
      stat_busy "Starting $name daemon"
      [[ -z "$PID" ]] &amp;&amp; /usr/sbin/crond $CRONDARGS &amp;&gt;/dev/null \
      &amp;&amp; { add_daemon $name; stat_done; } \
      || { stat_fail; exit 1; }
      ;;
  </code></pre>
  
  <p>While I can figure out most of the syntax, what the heck does this do:</p>
  
  <pre><code> [[ -z "$PID" ]]
  </code></pre>
  
  <p>I saw that also written as:</p>
  
  <pre><code> [ -z "$PID" ]
  </code></pre>
  
  <p>In reference I found that <code>[]</code> is used in if-statements, but I see none here. Any help is much appreciated. Thanks!</p>