I am trying to add an || regex to a bash ``ed one-liner in a perl script, if that makes any sense.
my $result = `df -H | grep -vE '^Filesystem|tmpfs|cdrom|none' | awk '{ print \$1 "\t" \$5 " used."}'`;
# .Private maybe the same as /dev/sdb1 so I'm trying to remove it too
# by trying to add || (m/\.Private/) to the above
print "$result";
So I am removing lines from the output that start with Filesystem, tmpfs, cdrom or none, at present, but I would also like to and the "or lines containing .Private" to the one-liner, if possible...
I have the below also, but want to reproduce its results with the above code...
my @result2 =Shell::df ("-H");
shift @result2; # get rid of "Filesystem..."
for( @result2 ){
next if ((/^tmpfs|tmpfs|cdrom|none/) || (m/\.Private/));
my @words2 = split('\s+', $_);
print $words2[0], "\t", $words2[4], " used\.\n";
}