Using for logview command bash

This commit is contained in:
WolverinDEV
2020-03-02 23:44:38 +01:00
parent 7e82f4c8ea
commit f48fa94b82
2 changed files with 9 additions and 3 deletions
+2 -2
View File
@@ -1904,9 +1904,9 @@ command_result ConnectedClient::handleCommandLogView(ts::Command& cmd) {
index += 2;
}
}
string command = "cat \"" + log_path + "\"";
string command = "bash -c 'cat \"" + log_path + "\"";
command += " | grep -E ";
command += R"("\] \[.*\]( ){0,6}?)" + server_identifier + " \\|\"";
command += R"("\] \[.*\]( ){0,6}?)" + server_identifier + " \\|\"'";
size_t beginpos = cmd[0].has("begin_pos") ? cmd["begin_pos"].as<size_t>() : 0ULL; //TODO test it?
size_t file_index = 0;