Package: coreutils
Version: 9.1-1
Severity: normal

Dear Maintainer,

Quoth csplit(1):
-- >8 --
       -z, --elide-empty-files
              remove empty output files
-- >8 --

So given:
-- >8 --
$ (cd nz; printf '%s\n' q w e r t | csplit - 1 4)
0
6
4
$ find nz
nz
nz/xx02
nz/xx01
nz/xx00
$ head nz/*
==> nz/xx00 <==

==> nz/xx01 <==
q
w
e

==> nz/xx02 <==
r
t
-- >8 --

What do you expect the equivalent with -z to be?
Naturally, the manual says "remove", so I'd expect xx01 and xx02
to remain unchanged, but xx00 to be gone.

Let's see:
-- >8 --
$ (cd z; printf '%s\n' q w e r t | csplit -z - 1 4)
6
4
$ find z
z
z/xx01
z/xx00
$ head z/*
==> z/xx00 <==
q
w
e

==> z/xx01 <==
r
t
-- >8 --

Hm. Smells to me like the empty sexions are just ignored entirely
not removed afterward.

наб

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: x32 (x86_64)
Foreign Architectures: amd64, i386

Kernel: Linux 6.0.0-6-amd64 (SMP w/2 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages coreutils depends on:
ii  libacl1      2.3.1-2
ii  libattr1     1:2.5.1-3
ii  libc6        2.36-7
ii  libgmp10     2:6.2.1+dfsg1-1.1
ii  libselinux1  3.4-1+b4

coreutils recommends no packages.

coreutils suggests no packages.

-- no debconf information

Attachment: signature.asc
Description: PGP signature

Reply via email to