From Crippled Goat, 10 Years ago, written in PCRE.
Embed
  1. say $k(3)$u"HDD information"$u$k;
  2. say $k(12)$b\Filesystem$b$k $k(10)\Type$k \($k(13)$r$r\Used$k\/$k(6)$r$r\Size$k\);
  3. exec("df -hT --exclude-type=tmpfs | grep \/dev\/")
  4. {
  5.         %info = $str.split("[ ]+", $1, r);
  6.         %dev = %info[0];
  7.         %fstype = %info[1];
  8.         %size = %info[2];
  9.         %used = %info[3];
  10.         %p_used = $str.lefttofirst(%info[5], "%");
  11.         %proc = $progressbar($int(%p_used));
  12.         say $k(12)$b%dev$b$k, $k(10)%fstype$k \($k(13)$r$r%used$k\/$k(6)$r$r%size$k\) %proc;
  13. }