Find a PID with ps + awk

This is really something i need to learn, and never forget. But this is kind of stuff, I always forget. So I write it up right now.

ps aux|gawk '$11 == "ssh" {print $2}'

Related Posts

6 thoughts on “Find a PID with ps + awk

  1. I don’t remember exactly why, but last time, pidof doesn’t work for me. and awk does .. Anyway, this can be a quick awk introduction

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>