Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /diskfree {
- /set %diskno $disk(0)
- if (%diskno >= 11) { say Disk number is greater than 10. Only showing first 10 disks. }
- //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
- /set %tdiskfree $round($calc($disk(1).free / 10000000000),2)
- /set %tdiskspace $round($calc($disk(1).size / 10000000000),2)
- if (%disk(2) == $true) {
- //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
- /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(2).free / 10000000000),2))
- /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(2).size / 10000000000),2))
- }
- if ($disk(3) == $true) {
- //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
- /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(3).free / 10000000000),2))
- /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(3).size / 10000000000),2))
- }
- if (disk(4) == $true) {
- //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
- /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(4).free / 10000000000),2))
- /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(4).size / 10000000000),2))
- }
- if (disk(5) == $true) {
- //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
- /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(5).free / 10000000000),2))
- /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(5).size / 10000000000),2))
- }
- if (%disk(6) == $true) {
- //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
- /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(6).free / 10000000000),2))
- /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(6).size / 10000000000),2))
- }
- if ($disk(7) == $true) {
- //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
- /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(7).free / 10000000000),2))
- /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(7).size / 10000000000),2))
- }
- if (disk(8) == $true) {
- //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
- /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(8).free / 10000000000),2))
- /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(8).size / 10000000000),2))
- }
- if (disk(9) == $true) {
- //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
- /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(9).free / 10000000000),2))
- /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(9).size / 10000000000),2))
- }
- if (disk(10) == $true) {
- //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
- /set %tdiskfree $calc(%tdiskfree + $round($calc($disk(10).free / 10000000000),2))
- /set %tdiskspace $calc(%tdiskspace + $round($calc($disk(10).size / 10000000000),2))
- }
- if (%diskno >= 11) {
- //echo -a You have a total of %tdiskfree $+ GB free of %tdiskspace $+ GB on 10 disks.
- }
- if (%diskno <= 10) {
- //echo -a You have a total of %tdiskfree $+ GB free of %tdiskspace $+ GB on %diskno disks.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement