Quantcast
Channel: See if a script is running when using #!/usr/bin/env - Unix & Linux Stack Exchange
Browsing all 2 articles
Browse latest View live

Answer by muru for See if a script is running when using #!/usr/bin/env

On Linux, you could use pgrep to get PIDs of likely suspects, and inspect the first argument of those PIDs (available in /proc/$PID/cmdline). /proc/$PID/cmdline has all the arguments (including...

View Article



See if a script is running when using #!/usr/bin/env

I have tried migrating the shebang for my bash scripts from #!/bin/bash to #!/usr/bin/env bash, and some of them were broken because they relied on this code that checks for existing instances of...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images