coreutils
[Top][All Lists]
Advanced

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

csplit: split file is created if input is empty


From: Daniel Hofstetter
Subject: csplit: split file is created if input is empty
Date: Thu, 9 Jan 2025 16:34:23 +0100

Hi,

While experimenting with csplit I noticed the following behavior: if
the input is empty, an empty xx00 split file is created:

$ printf "" | csplit - 5
csplit: input disappeared
$ ls xx00
xx00

However, if the input is not empty, no such file is created:

$ printf "a" | csplit - 5
csplit: ‘5’: line number out of range
1
$ ls xx00
ls: cannot access 'xx00': No such file or directory

Is this a bug or a feature?

Thanks,
Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]