Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: interpolate using backticks?

by djw (Vicar)
on Sep 20, 2000 at 22:37 UTC ( [id://33419]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to interpolate using backticks?

Here is the working code:
#!/usr/bin/perl -w use strict; my (@output, $dir); print "What dir? "; chomp($dir = <STDIN>); @output = `du -h $dir`; foreach (@output) { while (/[0-9][0-9].*?M\s/) { print; last; } }
Depending on what dir you specify it tells you any sub-directories that have greater than 10Mb worth of files in them. eg checking the amount of dirs in /home/:

64M     /home/djw
36M     /home/user
19M     /home/user2

I know that there are many other ways to get this, but it went along with what I was trying to learn.

Thanks,
djw

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://33419]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.