diff options
author | terminaldweller <thabogre@gmail.com> | 2023-01-14 04:30:53 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2023-01-14 04:30:53 +0000 |
commit | c81052b70888eb18dca82e33444ebbd9910f5ebc (patch) | |
tree | 6b6eb892438a15f7b4849d7508d61d9491b809c3 /bin/scotch | |
parent | update (diff) | |
download | scripts-c81052b70888eb18dca82e33444ebbd9910f5ebc.tar.gz scripts-c81052b70888eb18dca82e33444ebbd9910f5ebc.zip |
update
Diffstat (limited to 'bin/scotch')
-rwxr-xr-x | bin/scotch | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -535,16 +535,18 @@ def main(): lines = lines[:-2] for line in lines: # this is here to support the -i option - if line[0] == "[": + if "-t" in sys.argv or "-tt" in sys.argv or "-ttt" in sys.argv: + timestamp_end_index = line.find(" ") + print(Color.six + line[: timestamp_end_index - 1], end=" ") + line = line[timestamp_end_index + 1 :] + if "-n" in sys.argv: idx = line.find("]") - if idx - 1 < 16: - print(Color.twelve + line[0 : idx + 1], end=" ") - line = line[idx + 2 :] - if line[0] == "[": + print(Color.twelve + line[0 : idx + 1], end=" ") + line = line[idx + 2 :] + if "-i" in sys.argv: idx = line.find("]") - if idx - 1 == 16: - print(Color.thirteen + line[0 : idx + 1], end=" ") - line = line[idx + 2 :] + print(Color.thirteen + line[0 : idx + 1], end=" ") + line = line[idx + 2 :] if line[0 : line.find("(")] in syscall_set: syscall = line[0 : line.find("(")] sysargs = line[line.find("(") + 1 : line.find(")")].split() |