#!/usr/bin/perl use strict; use warnings; my @args; our $F; @args = ("cciss_vol_status /dev/ciss0 > checkstatres.txt"); system(@args); open RESULTS, "checkstatres.txt" or die "can't open datafile: $!\n"; while (<RESULTS>){ my @F=split(/:/, $_); if ( $F[2] =~ /OK./){ printf (" it's okay\n"); } else{ printf (" it's not ok\n"); } }
In reply to Re^2: specific field selection
by javpra
in thread specific field selection
by javpra
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |