My favorite bash trick is to use it to install zsh and move on.
But seriously. C'mon people please stop saying bash when you really mean command line of a typical Unix. Same for saying Linux when you mean a family of Unices. Please also consider your combination of OS, shell and editor isn't the only one reasonable and widely used around.
Hmm, that's interesting. My first response was "Surely, find can do that without creating a new file." But it looks like the other options only take a number of minutes, or a number of days, not a timestamp.
Oh my. Do use pgrep. It's much more robust (what do you do if you have to search for a process named "0:0"?), and you don't have to use pipelines and strange regex tricks (which will fail to work on zsh with "set nomatch" if you don't quote, for example).
grep treats "[m]yapp" as a regex, which will match "myapp" but not itself. That is, it won't match the exact string "[m]yapp" so the grep process won't show up in the listing.
But seriously. C'mon people please stop saying bash when you really mean command line of a typical Unix. Same for saying Linux when you mean a family of Unices. Please also consider your combination of OS, shell and editor isn't the only one reasonable and widely used around.
Thanks.