I am trying to write a perl program to check on various partition parameters. I use the dumpe2fs command as follows:
#!/usr/bin/perl
$cmd =
sprintf( "sudo dumpe2fs -h %s | grep -i \'mount count\' 2>/dev/null" , "/dev/sda6");
@res = `$cmd`;
exit;
The darn thing ALWAYS prints out the header line:
$ dumpe2fs-what.pl
dumpe2fs 1.42.5 (29-Jul-2012)
This completely messes up the output from my perl program. Is there no way to shut the thing up? Or am I confused again.
#!/usr/bin/perl
$cmd =
sprintf( "sudo dumpe2fs -h %s | grep -i \'mount count\' 2>/dev/null" , "/dev/sda6");
@res = `$cmd`;
exit;
The darn thing ALWAYS prints out the header line:
$ dumpe2fs-what.pl
dumpe2fs 1.42.5 (29-Jul-2012)
This completely messes up the output from my perl program. Is there no way to shut the thing up? Or am I confused again.
Comment