News for hackers. Stuff that matters.
Re:Sherver: Bash lightweight web server by junon on Wednesday December 22, 2021 @08:15AM (#29648863)
Yeah good catch, I forgot it since I didn't copy 1:1 the command line into vim when I formatted it for HN. I use fish + powerline so the command line doesn't copy correctly. In fish, it's `&|`, which would look weird anyway. I just forgot to add the `&` after the `|`.

The output was copied 1:1 though.

The inlining is an implementation detail and I've seen it happen differently across different platforms.

Re:Sherver: Bash lightweight web server by rascul on Wednesday December 22, 2021 @08:21AM (#29648947)
> The inlining is an implementation detail and I've seen it happen differently across different platforms.

Do you have more information on this? I would be interested to read more about it. As far as I was aware (and my knowledge is certainly not exhaustive), the only thing kinda related is as noted in the bash man page:

> The command substitution $(cat file) can be replaced by the equivalent but faster $(< file).

Re:Sherver: Bash lightweight web server by junon on Wednesday December 22, 2021 @08:26AM (#29648987)
I don't, sorry. I just know it's something some implementations opt-in to (especially drop-in replacements to bash). It's behavior I've observed quite a bit and have leveraged it in some cases to improve the performance of some critical bash scripts over the years. I'd also be interested in some prose about it.