Skip to main content
1 of 3
Flup
  • 8.3k
  • 2
  • 37
  • 51

You could try

ps --no-headers -o cmd -p $$

which will give you the name of the command associated with the script's pid.

Flup
  • 8.3k
  • 2
  • 37
  • 51