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

Re: shred bug? [was: Unidentified subject!]



On Tue 13 Feb 2024 at 11:21:08 (-0500), Greg Wooledge wrote:
> On Tue, Feb 13, 2024 at 09:35:11AM -0600, David Wright wrote:
> > On Tue 13 Feb 2024 at 07:15:48 (-0500), Greg Wooledge wrote:
> > > On Mon, Feb 12, 2024 at 11:01:47PM -0600, David Wright wrote:
> > > > … but not much. For me, "standard output" is /dev/fd/1, yet it seems
> > > > unlikely that anyone is going to use >&1 in the manner of the example.
> > > 
> > > Standard output means "whatever file descriptor 1 points to".  That
> > > could be a file, a pipe, a terminal (character device), etc.
> > 
> > Why pick on 1?
> 
> It's the definition.  Standard input is FD 0, standard output is FD 1,
> and standard error is FD 2.
> 
> > . It demonstrates the shell syntax element required (&) in order to
> >   avoid truncating the file, rather than shred overwriting it.
> 
> You are confused.  You're making assumptions about shell syntax that
> are simply not true.

You're right. I was looking too hard at the right side of the > and
neglecting the implied left side. It's always worth running these
things past your eyes. Thanks for the clear exposition that followed.

Cheers,
David.


Reply to: