Skip to content

Instantly share code, notes, and snippets.

View ashsmith's full-sized avatar
:shipit:

Ash Smith ashsmith

:shipit:
View GitHub Profile
@ashsmith
ashsmith / ps_opt_p_enabled_for_alpine.sh
Created March 27, 2019 13:40 — forked from benok/ps_opt_p_enabled_for_alpine.sh
Enable "ps [-p|--pid] PID" for /bin/ps from busybox (like Alpine Linux)
#!/bin/sh
# enable "ps [-p] PID" for /bin/ps from busybox (like Alpine)
# copy this script as /usr/local/bin/ps or /usr/bin/ps, and chmod 755 it.
if [ $# == 1 ]; then
echo $1 | grep -q -E '^[0-9]+$' # number only argument
if [ $? == 0 ]; then
OPT_P=1
ARG_P=$1
fi