3 ms·
I'm imagining someone trying something along these lines: maybe find ~/ | grep . | parallel rm {} ...and be fairly surprised to find everything deleted. It wa
by dantillberg 11y ago
I'm imagining someone trying something along these lines:
maybe find ~/ | grep . | parallel rm {}
...and be fairly surprised to find everything deleted. It wasn't find's fault!
- ecma 11y agoWhy would anyone ever invoke something like this and expect maybe to somehow steal those pipe characters? It's almost meaningless and displays just enough know how that the author should know how a shell works.
- geofft 11y agoHave you never run something like "sudo echo 0 > /proc/sys/..." and only realized your mistake after running it? Ever?
- trollian 11y agoOnce
- ecma 11y agoThe parent is more similar to doing `sudo find . | grep -- "*-foo.bar" | xargs rm` which I can definitely say I've never done because it's absurd. The consequences of redirecting to a file are usually nil, unlike running rm on the output of a pipeline without at least using -n on the destructive util...
- repsilat 11y agoIs the "right solution" to use `tee`? I saw that once, and it seemed like we should be able to do better -- as if, had `tee` not been in the standard we wouldn't have any way to do it...