Skip to content

Instantly share code, notes, and snippets.

@nnsee
Last active December 30, 2021 13:16
Show Gist options
  • Save nnsee/09de04d49dd66cb4577eaa0e3bf54110 to your computer and use it in GitHub Desktop.
Save nnsee/09de04d49dd66cb4577eaa0e3bf54110 to your computer and use it in GitHub Desktop.
Print caller
#!/bin/sh
_DATA="[$(date -uR)]
PID $$: $(tr '\0' ' ' < /proc/$$/cmdline)
PPID $PPID: $(tr '\0' ' ' < /proc/$PPID/cmdline)
UGID: $(id)
[-------------------------------]
"
echo "$_DATA" >> /tmp/trig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment