sponge's man page should include a warning on how not to use it
Bug #879077 reported by
David D Lowe
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
moreutils (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Using bash redirection with sponge does not work as expected. For example, this will make test_file empty:
sed 's/^/prefix/' test_file | sponge > test_file
Instead, one should do this instead:
sed 's/^/prefix/' test_file | sponge test_file
I feel the man page should be updated to include this warning.