Only split on tabs if there are at least 3 https://www.virtualmin.com/node/22369

This commit is contained in:
Jamie Cameron
2012-06-08 08:29:13 +08:00
parent 4889012001
commit 334b2dfcce

View File

@@ -72,7 +72,8 @@ while(<FSTAB>) {
local(@o, $at_boot);
chop; s/#.*$//g;
if (!/\S/ || /\signore\s/) { next; }
if (/\t/) {
if (/\t+[^\t]+\t+[^\t+]\t+/) {
# Contains at least 3 tabs .. assume tab separation
@p = split(/\t+/, $_);
}
else {