Separate filter from args

This commit is contained in:
Jamie Cameron
2018-02-13 21:59:56 -08:00
parent d5898de9ef
commit 37d1bda9ea

View File

@@ -99,8 +99,9 @@ elsif ($in{'view'}) {
$tailcmd .= " | tac";
}
$eflag = $gconfig{'os_type'} =~ /-linux/ ? "-E" : "";
$dashflag = $gconfig{'os_type'} =~ /-linux/ ? "--" : "";
$got = &proc::safe_process_exec(
"$cat | grep -i -a $eflag $filter | $tailcmd",
"$cat | grep -i -a $eflag $dashflag $filter | $tailcmd",
0, 0, STDOUT, undef, 1, 0, undef, 1);
} else {
# Not filtering .. so cat the most recent non-empty file