Closed AlbertVeli closed 6 years ago
red flags:
There's numerous lower priority style issues as well.
Yeah, it is better to remove sudo and let the script fail if the user doesn't have the required privileges. But you do want to save the output in a file because the user will probably want to add more awk lines to filter out data from more processes.
If you have a better way to send on SIGINT from the shellscript to ply without killing the shellscript, please change the trap line, I just used trap to get something that works, it is not optimal.
I agree with @brendangregg on most comments. In addition the syntax has changed in v2, so I will close this. Please feel free to submit a similar script for v2!
Make ptysnoop.ply a bit more useful by processing the data using a bourne shell script.