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}'

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

Comments are closed.