Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 2
    Misusing of sponge? What is the need of it here? Commented Nov 14, 2024 at 18:00
  • If you're sure you want them removed, change rm to rm -fv, but I'm also curious about sponge in this case. Commented Nov 14, 2024 at 18:46
  • This looks like the while ...; do xxx; done loop is being executed in a sub-shell whose stdin is piped from the sponge command rather than from the keyboard. Commented Nov 15, 2024 at 4:45
  • for those curious about sponge, it will force the pipe to wait for the whole input to be pasted before starting to process it. Without sponge, the output of rm, echo and my own pasting would be all intertwined. Commented Nov 18, 2024 at 10:14