3 ms·
If you think of the shell as a REPL and an iterative environment, the first variant has many benefits. The first two parts, might be an attempt to see 'can I
by fifticon 2y ago
If you think of the shell as a REPL and an iterative environment,
the first variant has many benefits.
The first two parts, might be an attempt to see 'can I write a regex to remove the parts we need to get rid of?. I had better run it first, to see it catches the ones I intended. Oops two times in a row, that one didn't catch them all, and that one would include some of those we MUST keep'.
I often do the same with SELECT/DELETE on production databases,
so I can visually inspect what I'm about to destroy. Transactions don't help me, because if I haven't verified that I'm correct, I won't know that I should use ROLLBACK.
- AnimalMuppet 2y agoOK, but you could still do ls roc_nightly*tar.gz and then replace "ls" with "rm" after you're sure that it gets the right files. (This is very much like your SELECT/DELETE, in fact.)