8000 `split` should refuse to overwrite the input file · Issue #3627 · uutils/coreutils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

split should refuse to overwrite the input file #3627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sylvestre opened this issue Jun 13, 2022 · 2 comments · Fixed by #3719
Closed

split should refuse to overwrite the input file #3627

sylvestre opened this issue Jun 13, 2022 · 2 comments · Fixed by #3719

Comments

@sylvestre
Copy link
Contributor
sylvestre commented Jun 13, 2022

Using GNU, all these commands are failing:

#export C=./target/debug/coreutils
rm -f xaa in2 in3
seq 10 | tee exp-1 > xaa
ln -s xaa in2
ln xaa in3

$C split -C 6 xaa
$C split -C 6 in2
$C split -C 6 in3
$C split -C 6 - < xaa

=>

# GNU:
$C split -C 6 xaa
split: 'xaa' would overwrite input; aborting
$C split -C 6 in2
split: 'xaa' would overwrite input; aborting
$C split -C 6 in3
split: 'xaa' would overwrite input; aborting
$C split -C 6 - < xaa
split: 'xaa' would overwrite input; aborting

All these commands pass with our version.
Test upstream:
https://github.com/coreutils/coreutils/blob/master/tests/split/guard-input.sh

@TheAlakazam
Copy link
Contributor

Hi, can I work on this? @sylvestre

@tertsdiepraam
Copy link
Member

@TheAlakazam Of course!

@jfinkels jfinkels linked a pull request Aug 12, 2022 that will close this issue
@jfinkels jfinkels moved this to Done in GNU Compatibility Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants
2AC7
0