Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Redirect a specific file descriptor to a pipe?
- X-seq: zsh-users 22554
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Redirect a specific file descriptor to a pipe?
- Date: Fri, 10 Mar 2017 10:51:12 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=4Z358NhQAFOHHaX+Iti5dT2LrbDvDUXE2N9i1vISic8=; b=sWTR6l1OqzAKQADUH79H9g4jntCJeA/W+oE/vxtyeLupg3o0vXQTmWKjvQhUy8/Ipx 5+2F8zpUFAqsZbl/Q/wiNb4sVC1MZXzZVEjZ5mfZn4+OEKqBBPFtzJlOnF/4Z4J0+4tP EkmfhdeaG1glj+4iQYtLKP2LC1svvP6AE+MD6Sk0l33W7kYr5nbxHbxEobLPUl/zfM5e 8Y78grwpjhzREsN0tK+HAT5knEIoJfOElou5H7clT4bNTXGIWFPkCWSNenqemRUednp1 7e1o5QCKGgN6IXFqeGxuFzQ3ov6Jm5d7Hx14LgxbIjEkotn/ObzdKwLTwR2SeJzMAjgF fedg==
- In-reply-to: <20170310172219.GA4206@chaz.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CADgEyUsOZZZhiJM5JQrdHORt-ehoLJtYmwW8po4=LViuydMFiw@mail.gmail.com> <170309180417.ZM14034__34042.4779606566$1489111700$gmane$org@torch.brasslantern.com> <20170310172219.GA4206@chaz.gmail.com>
On Mar 10, 5:22pm, Stephane Chazelas wrote:
}
} > strace -o /dev/fd/3 ./a.out > out.log 2> err.log 3>&1 | less
} [...]
Indeed, I've got the 3>&1 in the wrong place. Sorry about that.
} In zsh, to avoid the multios effect, you can do:
}
} {strace -o /dev/fd/3 ./a.out 3>&1 > out.log 2> err.log} | less
}
} or disable multios (set +o multios).
With multios and without the braces, out.log gets the a.out output
and less gets both the strace output and the a.out output, which is
actually what I meant to do (but might not be exactly what Nathan
wanted, in retrospect). Thanks for the correction.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author