title: How to export daily disk usage to csv format in shell scripting?
body: <p>My script is as below. When we run the script, it automatically saves the disk space usage in separate cells.</p>
  
  <pre><code>SIZES_1=`df -h | awk 'FNR == 1 {print $1","$2","$3","$4","$5","$6}'`
  SIZES_2=`df -h | awk 'FNR == 2 {print $1","$2","$3","$4","$5","$6}'`
  SIZES_3=`df -h | awk 'FNR == 3 {print $1","$2","$3","$4","$5","$6}'`
  SIZES_4=`df -h | awk 'FNR == 4 {print $1","$2","$3","$4","$5","$6}'`
  SIZES_5=`df -h | awk 'FNR == 5 {print $1","$2","$3","$4","$5","$6}'`
  SIZES_6=`df -h | awk 'FNR == 6 {print $1","$2","$3","$4","$5","$6}'`
  SIZES_7=`df -h | awk 'FNR == 7 {print $1","$2","$3","$4","$5","$6}'`
  SIZES_8=`df -h | awk 'FNR == 8 {print $1","$2","$3","$4","$5","$6}'`
  echo `date +%Z-%Y-%m-%d_%H-%M-%S` &gt;&gt;/home/jeevagan/test_scripts/sizes/excel.csv
  echo "$SIZES_1" &gt;&gt; /home/jeevagan/test_scripts/sizes/excel.csv
  echo "$SIZES_2" &gt;&gt; /home/jeevagan/test_scripts/sizes/excel.csv
  echo "$SIZES_3" &gt;&gt; /home/jeevagan/test_scripts/sizes/excel.csv
  echo "$SIZES_4" &gt;&gt; /home/jeevagan/test_scripts/sizes/excel.csv
  echo "$SIZES_5" &gt;&gt; /home/jeevagan/test_scripts/sizes/excel.csv
  echo "$SIZES_6" &gt;&gt; /home/jeevagan/test_scripts/sizes/excel.csv
  echo "$SIZES_7" &gt;&gt; /home/jeevagan/test_scripts/sizes/excel.csv
  echo "$SIZES_8" &gt;&gt; /home/jeevagan/test_scripts/sizes/excel.csv
  </code></pre>
  
  <p>This script is okay for my machine.</p>
  
  <p>My doubt is, if somebody else's machine has many file systems, my script won't work to fetch all the file systems usage. How to make it to grab all those automatically?</p>