SHARE
TWEET

Untitled

a guest Aug 22nd, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /diskfree {
  2.   /set %diskno $disk(0)
  3.   if (%diskno >= 11) { say Disk number is greater than 10. Only showing first 10 disks. }
  4.   //echo -a You currently have $round($calc($disk(1).free / 10000000000),2) $+ GB free of $round($calc($disk(1).size / 10000000000),2) $+ GB on disk $disk(1).path
  5.   /set %tdiskfree $round($calc($disk(1).free / 10000000000),2)
  6.   /set %tdiskspace $round($calc($disk(1).size / 10000000000),2)
  7.   if (%disk(2) == $true) {
  8.     //echo -a You currently have $round($calc($disk(2).free / 10000000000),2) $+ GB free of $round($calc($disk(2).size / 10000000000),2) $+ GB on disk $disk(2).path
  9.     /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(2).free / 10000000000),2))
  10.     /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(2).size / 10000000000),2))
  11.   }
  12.   if ($disk(3) == $true) {
  13.     //echo -a You currently have $round($calc($disk(3).free / 10000000000),2) $+ GB free of $round($calc($disk(3).size / 10000000000),2) $+ GB on disk $disk(3).path
  14.     /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(3).free / 10000000000),2))
  15.     /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(3).size / 10000000000),2))  
  16.   }
  17.   if (disk(4) == $true) {
  18.     //echo -a You currently have $round($calc($disk(4).free / 10000000000),2) $+ GB free of $round($calc($disk(4).size / 10000000000),2) $+ GB on disk $disk(4).path
  19.     /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(4).free / 10000000000),2))
  20.     /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(4).size / 10000000000),2))
  21.   }
  22.   if (disk(5) == $true) {
  23.     //echo -a You currently have $round($calc($disk(5).free / 10000000000),2) $+ GB free of $round($calc($disk(5).size / 10000000000),2) $+ GB on disk $disk(5).path
  24.     /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(5).free / 10000000000),2))
  25.     /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(5).size / 10000000000),2))
  26.   }
  27.   if (%disk(6) == $true) {
  28.     //echo -a You currently have $round($calc($disk(6).free / 10000000000),2) $+ GB free of $round($calc($disk(6).size / 10000000000),2) $+ GB on disk $disk(6).path
  29.     /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(6).free / 10000000000),2))
  30.     /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(6).size / 10000000000),2))
  31.   }
  32.   if ($disk(7) == $true) {
  33.     //echo -a You currently have $round($calc($disk(7).free / 10000000000),2) $+ GB free of $round($calc($disk(7).size / 10000000000),2) $+ GB on disk $disk(7).path
  34.     /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(7).free / 10000000000),2))
  35.     /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(7).size / 10000000000),2))
  36.   }
  37.   if (disk(8) == $true) {
  38.     //echo -a You currently have $round($calc($disk(8).free / 10000000000),2) $+ GB free of $round($calc($disk(8).size / 10000000000),2) $+ GB on disk $disk(8).path
  39.     /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(8).free / 10000000000),2))
  40.     /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(8).size / 10000000000),2))
  41.   }
  42.   if (disk(9) == $true) {
  43.     //echo -a You currently have $round($calc($disk(9).free / 10000000000),2) $+ GB free of $round($calc($disk(9).size / 10000000000),2) $+ GB on disk $disk(9).path
  44.     /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(9).free / 10000000000),2))
  45.     /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(9).size / 10000000000),2))
  46.   }
  47.   if (disk(10) == $true) {
  48.     //echo -a You currently have $round($calc($disk(10).free / 10000000000),2) $+ GB free of $round($calc($disk(10).size / 10000000000),2) $+ GB on disk $disk(10).path
  49.     /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(10).free / 10000000000),2))
  50.     /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(10).size / 10000000000),2))
  51.   }
  52.   if (%diskno >= 11) {
  53.     //echo -a You have a total of %tdiskfree $+ GB free of %tdiskspace $+ GB on 10 disks.
  54.   }
  55.   if (%diskno <= 10) {
  56.     //echo -a You have a total of %tdiskfree $+ GB free of %tdiskspace $+ GB on %diskno disks.
  57.   }
  58. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top