title: Using the read command to parse du -s output in linux shell script
body: <p>I'm trying to write a shell script to perform actions if a users home directory if over a certain size. Unfortionately when I try to use the read command to split up the <code>du -s</code> output I get 'command not found' since it tries to pass the number through to the shell, not into a variable like I want. Here's what I have so far for the script.</p>
  
  <pre><code>#!/bin/bash
  cd /home
  for i in `ls`
  do
      j=`du -s $i`
      #this line gives me the error
      k=`$j |read first;`
  done
  </code></pre>
  
  <p>I get output like the following:</p>
  
  <pre><code>./takehome.sh: line 6: 3284972: command not found
  </code></pre>
  
  <p>where 3284972 is the size of the directory.</p>