help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] shebang for language that does not use # for comment


From: Peng Yu
Subject: Re: [Help-bash] shebang for language that does not use # for comment
Date: Tue, 3 Jul 2012 19:14:20 -0500

> and if you don't like putting the EOF at the end, you could use hacks like:
> ====
> #!/bin/bash
> shopt -s lastpipe; tail -n +2 "$0" | exec /usr/bin/env gp
>
> \p 212
> (1.378-0.09143*I)^(14.87+0.3721*I)
> ====

I never knew lastpipe this before. But I'm having difficulty in
understanding the following description. Could anybody elaborate it a
bit? In the context of the above example, how it works?

              lastpipe
                      If set, and job control is not active, the shell
runs the last command of a pipeline not executed in the background in
the current shell environment.

BTW, how "job control" can be nonactive?

-- 
Regards,
Peng



reply via email to

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