sponge's man page should include a warning on how not to use it

Bug #879077 reported by David D Lowe
6
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.

Robert Roth (evfool)
tags: added: manpage
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.