 <p>Use double quotes to allow bash to perform variable substitution. Single quotes disable bash variable substitution mechanism.</p> <pre><code>ps -clx | grep "$1" | awk "{print $2}" | head -1 </code></pre>