Vanhalen has asked for the wisdom of the Perl Monks concerning the following question:
Hi getleman
Im perl beginner who just started learning. I just want to figure out of a way to do something in perl that will be very useful for my line of work. For now what I want is this.
1. Want to findout the partition with most free space. (df -h)
for an instance say I have /dev/sda1 with 20% free space and /dev/sda2 with 30%
2. I want to print this to the user as follows
select the partition with the most space:
1. /dev/sda2
2. /dev/sda1
3. if user hit any key other than 1 or 2 the script has to say wrong choice and go back to the 2nd point( select partition with most space?) without exiting.
What is the easiest way of doing this people? Please help out sir.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: return to previous option
by GrandFather (Saint) on Oct 19, 2011 at 19:49 UTC | |
by pvaldes (Chaplain) on Oct 19, 2011 at 21:07 UTC | |
Re: return to previous option
by Anonymous Monk on Oct 19, 2011 at 23:05 UTC | |
by pvaldes (Chaplain) on Oct 20, 2011 at 00:47 UTC |
Back to
Seekers of Perl Wisdom