Re: The difference between `X=x f | cat` and `{ X=x; f; } | cat`
From:
Kerin Millar
Subject:
Re: The difference between `X=x f | cat` and `{ X=x; f; } | cat`
Date:
Sat, 21 Jan 2023 01:13:21 +0000
On Fri, 20 Jan 2023 17:25:10 -0600
Peng Yu <pengyu.ut@gmail.com> wrote:
> I made a program to check for even longer variable name lengths. It
> seems that when the variable length is really long, there is a
> significant and reproducible difference. So then it seems that `{ X=x;
You are not the only one to have noticed.
https://github.com/izabera/shellnotes/blob/031d6edcc0e76e76af77d54a56b0f1cfc9f30d1d/bash#L9
I have never attempted to find out why, partly because I have come to expect
for bash to be slow in just about all respects.
--
Kerin Millar