[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Examples of concurrent coproc usage?
From: |
Andreas Schwab |
Subject: |
Re: Examples of concurrent coproc usage? |
Date: |
Tue, 16 Apr 2024 09:56:08 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
On Apr 16 2024, Carl Edquist wrote:
> Well, you _can_ shovel binary data too: (*)
>
> while IFS= read -rd '' X; do printf '%s\0' "$X"; done
>
> and use that pattern to make a shell-only version of tee(1) (and I suppose
> paste(1)). Binary data doesn't work if you're reading newline-terminated
> records, because you cannot store the NUL character in a shell
> variable. But you can delimit your records on NULs, and use printf to
> reproduce them.
Though that will likely add a spurious null at EOF.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
- Re: Examples of concurrent coproc usage?, (continued)
- Re: Examples of concurrent coproc usage?, felix, 2024/04/17
- Re: Examples of concurrent coproc usage?, Chet Ramey, 2024/04/03
- Re: Examples of concurrent coproc usage?, Zachary Santer, 2024/04/03
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Re: Examples of concurrent coproc usage?, Zachary Santer, 2024/04/15
- Re: Examples of concurrent coproc usage?, Carl Edquist, 2024/04/16
- Re: Examples of concurrent coproc usage?,
Andreas Schwab <=
- Re: Examples of concurrent coproc usage?, Zachary Santer, 2024/04/16
- Re: Examples of concurrent coproc usage?, Carl Edquist, 2024/04/16
- Re: Examples of concurrent coproc usage?, Chet Ramey, 2024/04/17
- Re: Examples of concurrent coproc usage?, Martin D Kealey, 2024/04/17
- Re: Examples of concurrent coproc usage?, Chet Ramey, 2024/04/19
- Re: Examples of concurrent coproc usage?, Martin D Kealey, 2024/04/21
- Re: Examples of concurrent coproc usage?, Chet Ramey, 2024/04/22
- Re: Examples of concurrent coproc usage?, Carl Edquist, 2024/04/20
- Re: Examples of concurrent coproc usage?, Martin D Kealey, 2024/04/21
- Re: Examples of concurrent coproc usage?, Carl Edquist, 2024/04/21