>>>>> On Wed, 13 Sep 2023, Eli Schwartz wrote: >> "|| die" should also be added for the cat command.
> Redirecting output to a file in a directory you have just guaranteed > to exist cannot fail. That's a rather bold statement. I can imagine a number of possible failures, e.g. no space left on device, quota exceeded, or a low-level I/O error of the filesystem. Also fork or exec of the cat command could fail (e.g. out of memory). While either of these may be unlikely here, best practice is to check for errors of _all_ external commands.