code snippet is below :
#!/usr/bin/perl -w use strict; system("pvscan>>pv.txt1"); open my $FH,"pv.txt1" or die "Cannot open file: $!"; while(my $line = <$FH>){ my $pvname = $line =~ /\[\d+\.\d+\sGB\s\/\s\d+\.\d+\sGB\]/i; print $pvname; }
i want the assignment to look like :
pvname = [557.62 GB / 20.50 GB free]
In reply to Re^2: Text filer and assign
by intoperl
in thread Text filer and assign
by intoperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |