Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Capture stdout, stdin, and exit status in different variables without using temporary files
- X-seq: zsh-users 24148
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- To: Aryn Starr <whereislelouch@xxxxxxxxxx>
- Subject: Re: Capture stdout, stdin, and exit status in different variables without using temporary files
- Date: Fri, 16 Aug 2019 08:22:09 +0100
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=b+Is2V4wSNJCiXqcDGND71Csv2dR9XjwnH/OgtkPB3w=; b=Nr4HIs9rWRKvZDBlbxqO1OjeCRSKgak3IGOZ6UN54iqYEa5aFYuKhKAyrc2EKAigu3 qEy834+SsMD3zkq8zbdaL63jVsOpR3z2ujocbi73ZC3CdnUq0bYhVTeJvRSAblwItrSt Twlbnq2Y/+jPkoaGt7HX/a/NE95OIit5LZt1oBLK0rzWw9wo0UeSf2Cb3AFlrkIXsJPL Txl3sQ3afZziOTFSlF+0waQCn9hq5Q739/gNKZpFrIxdrs9tRx5PIlCPXPIfXTU3D8hi RS9G5ER/XAsq8xxRClGk+S1nYlyioulHNRWu4tPVd+uzH7IoudshNHIuM1cniY/yCXkz Ai5Q==
- In-reply-to: <D639E5A6-A28C-40EE-B0E6-27BED4C8CDDB__31117.9253900022$1565917892$gmane$org@icloud.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>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mail-followup-to: Aryn Starr <whereislelouch@xxxxxxxxxx>, zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <D639E5A6-A28C-40EE-B0E6-27BED4C8CDDB__31117.9253900022$1565917892$gmane$org@icloud.com>
2019-08-15 20:22:38 +0430, Aryn Starr:
> Per http://mywiki.wooledge.org/BashFAQ/002, it seems this can not be done in bash. Is it possible in zsh?
> If not, is a named pipe advantageous to a temporary file?
> Is there a way to avoid disk IO (which will probably slow things down considerably)?
See
https://unix.stackexchange.com/questions/472585/read-write-to-the-same-file-descriptor-with-shell-redirection/473402#473402
(and
https://unix.stackexchange.com/questions/430161/redirect-stderr-and-stdout-to-different-variables-without-temporary-files
)
Redirecting to files doesn't necessarily mean disk I/O.
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author