title: Run piped commands with eval
body: <p>I have the following command line to check free space of a file system:</p>
  
  <pre><code>fs_used=`df -h /u01 | sed '1d' | sed '1d' | awk '{print $4}' | cut -d'%' -f1`
  </code></pre>
  
  <p>It works fine.  It returns the percentage of the used space on the file system (without the % symbol).</p>
  
  <p><strong>Now I need to make it variable and run it with the eval command</strong>.  I tried the following but it doesn't work (exit with df: invalid option -- 'd')</p>
  
  <pre><code>df_cmnd="df -h $fs1 | sed '1d' | sed '1d' | awk '{print $4}' | cut -d'%' -f1"
  fs_used=eval $df_cmnd
  </code></pre>
  
  <p>The problem, I guess, is that eval cannot run piped commands.  Is that true?
  is there any workaround or alternative to make this code run?</p>