help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automatically use redirection to capture return status of unnamed pi


From: Koichi Murase
Subject: Re: Automatically use redirection to capture return status of unnamed pipe?
Date: Tue, 7 Apr 2020 11:39:24 +0900

2020-04-07 10:28 Peng Yu <address@hidden>:
> Could this cause any conflict if I uses some fd that bash
> uses automatically?

Yes.

If you worry about the conflicts, you can always let Bash to allocate
unused fd by using {varname} redirections (such as {fd}>file, {fd}<&0)
instead of redirections with explicitly specified fd (such as 3>file,
3<&0).

--
Koichi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]