uutils / coreutils

Cross-platform Rust rewrite of the GNU coreutils
https://uutils.github.io/
MIT License
17.61k stars 1.27k forks source link

csplit: issues reading from pipe #6461

Open mtekel opened 3 months ago

mtekel commented 3 months ago

Hi,

with csplit-0.0.25 (also present in 0.0.22 already, I didn't test any other versions than these two, but release notes of 0.0.26 (latest at the time of this ticket) don't indicate changes/fix for this):

csplit -f "mycerts-" -b "%01d.crt" -z <(echo "my special certs") '/-----BEGIN CERTIFICATE-----/' '{*}'
csplit: '/proc/self/fd/11' is not a regular file

The redirect is a standard pipe:

# stat <(echo "my special certs")
  File: '/proc/self/fd/11' -> 'pipe:[142282]'
  Size: 64          Blocks: 0          IO Block: 1024   symbolic link
Device: 2ch/44d Inode: 142708      Links: 1
Access: (0500/lr-x------)  Uid: (    0/C5382917)   Gid: (    0/    root)
Access: 2024-06-11 10:06:35.660004597 +0000
Modify: 2024-06-11 10:06:35.660004597 +0000
Change: 2024-06-11 10:06:35.660004597 +0000
 Birth: -

OS:

# uname -a
Linux mycontainer 6.6.30-0-virt #1-Alpine SMP Mon, 06 May 2024 07:55:42 +0000 aarch64 GNU/Linux

I have also tested with x86-64 container and it has same issue as aarch64.