Edit: Meh, on looking at the manpage I remembered the argument is a pattern which can make the above very tricky. Alternatively pgrep could really fallback to /proc/_pid_/cmdline on failure or use -f as default.
Edit: Meh, on looking at the manpage I remembered the argument is a pattern which can make the above very tricky. Alternatively pgrep could really fallback to /proc/_pid_/cmdline on failure or use -f as default.