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.