You can try the following ($percent) = `df -k` =~ /(\d+)%/;
Regards Robert Graham -----Original Message----- From: Kipp, James [mailto:[EMAIL PROTECTED]] Sent: 27 November 2001 15:47 To: 'James Kelty'; [EMAIL PROTECTED] Subject: RE: File System Sizes.... > > $percent = `df -k | awk '{print $5}'`; > if($percent > "90") { > > do something > } > > I though that this would work, but I didn't get just the % > column from the > awk statment. I am really trying > to do this all in perl instead of mixing it with awk. in that case all you need to do is capture the df -k output then regex it. $percent = `df -k`; $percent =~/regex_to_capture_number/; -- don't have time to look at the output right now and regex but should be easy. > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]