Reputation: 19
How can I just get the PID
of the following command:
ps aux --sort -rss
Thanks
Upvotes: 0
Views: 870
Reputation: 53
Try this if you want to avoid using any external tools:
ps -ax --sort -rss -o pid
By forgoing u (user-oriented format option) and adding -o pid (user-defined output format - only show pid), you'll get what you need.
Upvotes: 2