Update 'wipe.pl'
Added conditional to limit IO to terminal for progress output.
This commit is contained in:
parent
69b9947f58
commit
3110fcd761
4
wipe.pl
4
wipe.pl
@ -5,6 +5,8 @@ use Digest::MD5 "md5_base64";
|
||||
use POSIX;
|
||||
use v5.10;
|
||||
|
||||
$| = 0; #turn off IO buffering
|
||||
|
||||
# set CONFIRMATION_PHRASE to anything falsy (like zero) if you are a fast and
|
||||
# loose badass and you don't need no stinkin' safety net.
|
||||
use constant CONFIRMATION_PHRASE => "YES";
|
||||
@ -150,9 +152,11 @@ sub wipethemdrives {
|
||||
seek($longdiskw,0,0);
|
||||
until (eof $longdiskw) {
|
||||
print $longdiskw "\0";
|
||||
if ( !(tell($lingdiskw) % ($totoalBytes / 1000) ) {
|
||||
printf(" %5.5s%%\r\r\r\r\r\r\r", sprintf("%.2f", (tell($longdiskw)/$totalBytes)) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# to test a drive
|
||||
|
Loading…
x
Reference in New Issue
Block a user