Quantcast
Channel: See if a script is running when using #!/usr/bin/env - Unix & Linux Stack Exchange
Browsing latest articles
Browse All 2 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 latest articles
Browse All 2 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>