#!/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