Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu'
-DCONF_VENDOR='pc'
-DLOCALEDIR='/usr/share/locale' -DPACKAGE='bas
Don't know if this is the right place for this sort of thing, but is it
somehow possible to do some sort of consecutive job processin in bash,
i. e. being able to split a one-liner like:
command1 && command2 && command3
into several, separate command lines:
command1 &
%1 && command2 &
%2 && c
Mårten Segerkvist wrote:
> command1 &
> %1 && command2 &
> %2 && command3
>
> (where the second command line awaits the execution of the first etc.)
In a script you can grab the process id of the last background job
with $!. Then you can wait for that job id.
command &
wait $! && command2 &
Nico Schottelius <[EMAIL PROTECTED]> wrote:
>Please remove the need for -e and ignore -e for a some time, until
>it vanished from user programs.
There is too much variation among implementations of "echo" to ever
hope for uniformity. Different implementations all react differently
to opti
Mårten Segerkvist <[EMAIL PROTECTED]> wrote:
> i. e. being able to split a one-liner like:
>
> command1 && command2 && command3
>
> into several, separate command lines:
You can write that one-liner on multiple lines:
command1 &&
command2 &&
command3
paul
__
Nico Schottelius wrote:
Bash needs -e to react on escape characters.
No other shell (afaik) does that (confirmed with dash, ksh and zsh),
nor does posix specify that behaviour:
http://www.opengroup.org/onlinepubs/009695399/utilities/echo.html
Having discovering 'trap' I scripted this:
declare -a queue[]
function q() {
[EMAIL PROTECTED]"cd `pwd` && $@"
}
function runq() {
if [ -n "$queue" ]; then
local command=$queue
queue=("[EMAIL PROTECTED]:1}")
bash -c "($command; kill -33 $$)" &
fi
}
trap 'runq' 33
which works almost a