Last active
August 28, 2022 08:49
-
-
Save OscarL/6c1529906fa6387161bc9e22c4be1842 to your computer and use it in GitHub Desktop.
A pidof shell implementation for Haiku
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Poor-man's pidof replacement for Haiku | |
# | |
# Usage: > pidof <ProcessName> | |
if [ "$#" -eq "1" ] ; then | |
ps -o Id Team | grep $1 | grep -v 'grep' | grep -v 'pidof' | grep -o '[0-9]*' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment