in reply to Unix size againin thread Unix size
my ($location) = @_; $location =~ s{ ([\\\']) }{ '\\' . $1 }gex; # crude escape print "\n".'Calculating Scan Statistics...'."\n"; my $cmd = "du -sk '$location'"; warn $cmd; # let's see what's actually getting executed! my $size = `cmd`; print "$size"; [download]
Its not working gives this when run: du -sk '' at test_2.pl line 5
Then $location is not what you think it is. Debug your script.
Well, then that means that $location is an empty string, or perhaps undefined. So the problem lies elsewhere in your code. Post more of the script.
www.com | www.net | www.org
No recent polls found