Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • (1) The question doesn't say that the user is looking for one of his own processes — the user might not know the owner of the process he's looking for.  (2) As fancy as this answer is, it would still fail if you had said "${USER}.* /usr/bin/ssh-agent".  It works because you said [ ]; i.e., you are just using the mechanism of the accepted answer.  You might as well just grep "[s]sh-agent". Commented Nov 6, 2015 at 14:27
  • You are right. (1) I shared what might be useful as I found myself facing this page once in a while (2) Yes I used regular expression as in accepted answer. (3) I updated my answer to be the same as accepted as the one is better, but I also showed how to make and alias to be used with username provided or without it. (4) Also shown how to define function, though it is not necessary but works in interesting way as $1 and $2 doesn't overlap. Thx #G-Man Commented Nov 7, 2015 at 16:30