Hi.
In an attempt to capture the output of 'time' I used the process substitution
and noticed that the subshell also prints its times. Actually I this happens
when I redirect any fd, not just stderr.
#!/bin/bash
time {
sleep 0.25
exec 6> >(
sed 's/^/captured: /'
On Wed, Apr 04, 2018 at 11:25:26AM +0800, 積丹尼 Dan Jacobson wrote:
> $PS4 is for sh -x. Well, $PS5 or $PSv should be for sh -v!
>
> Imagine, with just a simple PS5='$ ', one could produce
> perfect dialogues,
>
> $ set -eu /tmp/x
> $ mkdir $@
> $ cd $@
> $ seq 3|xargs touch
> $ ls -U $@
> 3 2 1
On Wed, Apr 04, 2018 at 11:21:56AM +0300, Basin Ilya wrote:
> Hi.
>
> In an attempt to capture the output of 'time'
https://mywiki.wooledge.org/BashFAQ/032
On 4/3/18 7:07 PM, PRussell wrote:
> Hi,
>
> The error seems to be localized to the expansion of PS4 when "set -x" is
> active.
>
> Please see sample script below.
>
> I am aware of the unusual parameter expansion for FUNCNAME. There might be a
> local historical reason. :-)
>
> It does not
On 4/3/18 7:07 PM, PRussell wrote:
> Hi,
>
> The error seems to be localized to the expansion of PS4 when "set -x" is
> active.
>
> Please see sample script below.
It's not quite that, though the expansion below does demonstrate what I
think is the problem.
If I am right about the cause, the p
On 4/4/18 4:21 AM, Basin Ilya wrote:
> Hi.
>
> In an attempt to capture the output of 'time' I used the process substitution
> and noticed that the subshell also prints its times. Actually I this happens
> when I redirect any fd, not just stderr.
It's an interaction between command timing and t