[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: any plans for command substitution that preserves trailing newlines?
From: |
Greg Wooledge |
Subject: |
Re: any plans for command substitution that preserves trailing newlines? |
Date: |
Tue, 1 Jun 2021 20:24:56 -0400 |
On Wed, Jun 02, 2021 at 07:25:25AM +0800, konsolebox wrote:
> On Tue, Jun 1, 2021 at 7:58 PM Greg Wooledge <greg@wooledge.org> wrote:
> > Is the OP actually trying to store *binary* data in a shell variable?
> > This is doomed to fail because you can't handle NUL bytes.
>
> I considered this, but he did say "anything but NUL" so he's pretty
> much aware. It's also another concern I didn't care caring about.
> The information I contributed sufficed to what he asked.
At this point I'm 95% convinced the OP has no actual problem to solve,
and is just chasing theoretical knowledge. The big give-away for me
is how they keep jumping around from bash to POSIX sh to "all shells"
(whatever that means) in their constant stream of questions.