[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: singleton for script with shebang
From: |
Ole Tange |
Subject: |
Re: singleton for script with shebang |
Date: |
Fri, 2 Jan 2015 09:48:27 +0100 |
On Thu, Jan 1, 2015 at 10:54 PM, Bradley Asztalos
<brad@customweather.com> wrote:
> But I'm wondering if it is possible to use shebang in this context as in:
It is.
> -------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?
You are going to say 'Doh'.
/bin/bash is not an argument for --shebang-wrap. It is the command you
want to be run. Also --semaphore --fg -u --id are not options for
bash. Swap them around and you are good:
#!/opt/local/bin/parallel --shebang-wrap --semaphore --fg -u --id
lock_id /bin/bash
(Here is where you say 'Doh').
/Ole
Re: singleton for script with shebang,
Ole Tange <=
- Re: singleton for script with shebang, Bradley, 2015/01/02
- Re: singleton for script with shebang, Bradley Asztalos, 2015/01/02
- Re: singleton for script with shebang, Bradley Asztalos, 2015/01/02
- Re: singleton for script with shebang, Ole Tange, 2015/01/02
- Re: singleton for script with shebang, Bradley Asztalos, 2015/01/02
- Re: singleton for script with shebang, Ole Tange, 2015/01/03
- Re: singleton for script with shebang, Bradley, 2015/01/03
- Re: singleton for script with shebang, Ole Tange, 2015/01/04
- Re: singleton for script with shebang, Bradley Asztalos, 2015/01/04