From 3110fcd761517b79a9bed3322fd9d9231ba5957c Mon Sep 17 00:00:00 2001 From: bluesaxman Date: Mon, 4 Nov 2019 12:06:51 -0700 Subject: [PATCH] Update 'wipe.pl' Added conditional to limit IO to terminal for progress output. --- wipe.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wipe.pl b/wipe.pl index 9f2cbea..779a47e 100755 --- a/wipe.pl +++ b/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,7 +152,9 @@ sub wipethemdrives { seek($longdiskw,0,0); until (eof $longdiskw) { print $longdiskw "\0"; - printf(" %5.5s%%\r\r\r\r\r\r\r", sprintf("%.2f", (tell($longdiskw)/$totalBytes)) ); + if ( !(tell($lingdiskw) % ($totoalBytes / 1000) ) { + printf(" %5.5s%%\r\r\r\r\r\r\r", sprintf("%.2f", (tell($longdiskw)/$totalBytes)) ); + } } } }