title: bash unary operator expected error
body: <p>This is the script I came up with</p>
  
  <pre><code>#!/bin/bash
  
  expression=$1
  field=$2
  if [ -z "$expression" ]; then
  echo "expression is missing"
  exit 1
  fi
  
  if [ -f /home/miked/table ]; then
    if [ -f table ] &amp;&amp; [ grep "$expression table" ]; then
      grep "$expression" table | cut -d: -f${2:-3} | clipit
    else
      echo "no match found"
    fi
  else
    echo "there is no table file"
  fi
  </code></pre>
  
  <p>As a matter of fact I know how to fix it, but I don't know why
  it's fixed.</p>
  
  <p>If I remove the space between <code>grep</code> and <code>"</code>, all is working fine, I just can't seem to understand why.</p>
  
  <p>If I do <code>grep something file</code> directly to the command line, it's working good. Why do I to stick the <code>grep</code> to the <code>"</code> in the script?</p>