From: WANG Cong <xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/2] bash3 compat patch
Date: Tue, 11 Oct 2011 07:11:41 +0000 (UTC) [thread overview]
Message-ID: <j70q7d$ldn$1@dough.gmane.org> (raw)
In-Reply-To: 1318283885-1792-2-git-send-email-soltys@ziu.info
On Mon, 10 Oct 2011 23:58:04 +0200, Michal Soltys wrote:
> + function rotor() {
> + local _f1 _f2
> + while read _f1; do
> + echo "$_f1"
> + if read _f2; then
> + echo "$_f2" 1>&${_side2}
> + fi
> + done | bmf1 1>&${_merge} + }
> # Use two parallel streams to filter alternating modules.
> - local merge side2
> - ( ( local _f1 _f2
> - while read _f1; do echo "$_f1"
> - if read _f2; then echo "$_f2" 1>&${side2}; fi
> - done \
> - | bmf1 1>&${merge} ) {side2}>&1 \
> -
> | bmf1 ) {merge}>&1
> + eval "( ( rotor ) ${_side2}>&1
> | bmf1 ) ${_merge}>&1"
> }
> hostonly='' instmods sr_mod sd_mod scsi_dh scsi_dh_rdac
> scsi_dh_emc hostonly='' instmods pcmcia firewire-ohci
Interesting function, if i understand it correctly, it parallelizes
the stream into two so that can speed up the pattern filtering?
My brain spins...
next prev parent reply other threads:[~2011-10-11 7:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-10 21:58 [PATCH 0/2] minimum bash version Michal Soltys
[not found] ` <1318283885-1792-1-git-send-email-soltys-R61QfzASbfY@public.gmane.org>
2011-10-10 21:58 ` [PATCH 1/2] bash3 compat patch Michal Soltys
2011-10-11 7:11 ` WANG Cong [this message]
2011-10-11 8:53 ` Michal Soltys
[not found] ` <4E940418.6080102-R61QfzASbfY@public.gmane.org>
2011-10-12 16:09 ` John Reiser
[not found] ` <1318283885-1792-2-git-send-email-soltys-R61QfzASbfY@public.gmane.org>
2011-10-11 7:39 ` Harald Hoyer
2011-10-10 21:58 ` [PATCH 2/2] explicitly verify bash version Michal Soltys
[not found] ` <1318283885-1792-3-git-send-email-soltys-R61QfzASbfY@public.gmane.org>
2011-10-11 7:39 ` Harald Hoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='j70q7d$ldn$1@dough.gmane.org' \
--to=xiyou.wangcong-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.