parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

singleton for script with shebang


From: Bradley Asztalos
Subject: singleton for script with shebang
Date: Thu, 1 Jan 2015 13:54:57 -0800

I have a simple script, foo.sh::

#!/bin/bash 
echo "start" $$
sleep 10
echo "end" $$

I can run make sure this runs as a singleton with 

sem --fg -u --id lock_id ./foo.sh


But I'm wondering if it is possible to use shebang in this context as in:

-------singleton.sh---------

#!/opt/local/bin/parallel --shebang-wrap /bin/bash --semaphore --fg -u --id lock_id
echo "start" $$
sleep 10
echo "end" $$

---------

This does not work. Any ideas here? 

Bradley


reply via email to

[Prev in Thread] Current Thread [Next in Thread]