parallel
[Top][All Lists]
Advanced

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

Re: singleton for script with shebang


From: Bradley
Subject: Re: singleton for script with shebang
Date: Fri, 2 Jan 2015 01:29:43 -0800

Agreed "Doh!"



> On Jan 2, 27 Heisei, at 12:48 AM, Ole Tange <ole@tange.dk> wrote:
> 
> 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



reply via email to

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