I need some help tweaking my code to look for another attribute in this unix df
output:
Ex.
Filesystem Size Used Avail Capacity Mounted on
/dev/ad4s1e 61G 46G 9.7G 83% /home
So far I can extract capacity, but now I want to add Avail.
Here is my perl line that grabs capacity. How do I get "Avail"?? Thanks!
my @df = qx (df -k /tmp);
my $cap;
foreach my $df (@df)
{
($cap) =($df =~ m!(d+)\%!);
};
print "$cap
";
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…