title: comparing folder size in bash?
body: <pre><code>actual_size="du -h $some_folder";   
  y='eval $actual_size`
  max_size=2MB
  
      if [[ y -lt  $max_size ]]; then            
              echo `du -h $some_folder`
              cp "$file" $some_folder` #$file points to some file
  </code></pre>
  
  <p>Whats wrong with above lines of code? I also tried</p>
  
  <p>if [[ $(stat -c %s $some_folder) -lt  $max_size ]]; then</p>
  
  <p>any help would be appreciated, Thnaks!</p>