Skip to content

Instantly share code, notes, and snippets.

@OscarL
Last active August 28, 2022 08:49
Show Gist options
  • Save OscarL/6c1529906fa6387161bc9e22c4be1842 to your computer and use it in GitHub Desktop.
Save OscarL/6c1529906fa6387161bc9e22c4be1842 to your computer and use it in GitHub Desktop.
A pidof shell implementation for Haiku
#!/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