scripts

misc scripts and tools
git clone git://git.2f30.org/scripts
Log | Files | Refs

commit f75516deccf35aef2c6fbaa644e964043fefa4d8
parent e875dc59bae711ae4f02bc2d6bc8d095bf68c14c
Author: cipher <haris@2f30.org>
Date:   Wed,  5 Feb 2014 15:33:22 +0200

better string handling for df

Diffstat:
Mperley | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/perley b/perley @@ -37,10 +37,8 @@ my @mem = split(/ /, $memory); # grep / space chomp (my $space = qx(df -h | grep \/\$)); -my @space_stripped = split(/ /, $space); -my @home_space = split(/ /, $space_stripped[4]); -$space_stripped[2] =~ s/\s//g; -$space_stripped[3] =~ s/\s//g; +$space =~ s/\h+/ /g; +my @space_stripped = split(/ /, $space); ###### Result ####### print '