#1063837 coreutils: shred: documentation bug: 3>- should be 3>&-

Package:
coreutils
Source:
coreutils
Description:
GNU core utilities
Submitter:
Greg Wooledge
Date:
2024-02-17 13:21:02 UTC
Severity:
normal
Tags:
#1063837#5
Date:
2024-02-13 12:21:35 UTC
From:
To:
The info page for shred includes this example code:

     i=$(mktemp)
     exec 3<>"$i"
     rm -- "$i"
     echo "Hello, world" >&3
     shred - >&3
     exec 3>-

The last line is incorrect.  It should be "exec 3>&-" which closes file
descriptor 3.  As written, the example code creates or truncates a
file literally named "-" instead.

This same error appears on
https://www.gnu.org/software/coreutils/manual/html_node/shred-invocation.html
(as of today) so I believe it's an upstream bug.

#1063837#10
Date:
2024-02-17 13:17:17 UTC
From:
To:
Fixed upstream.
https://github.com/coreutils/coreutils/commit/d39c52372

Thank you.
Pádraig.