With
exec >LOG 2>&1
I can change stdout and stderr for the current shell, so all following commands will inherit those file descriptors.
Is there a way to change stdout/stderr for the current shell to a pipe?
I've tried
exec | gpg -aer 0x6aabe354
in the hope to replace current stdout with gnupg, encrypting the output of the remaining script, but I received cleartext output and an empty PGP message instead, so clearly this is not the correct syntax.
Asked by Simon Richter
(4990 rep)
Feb 28, 2025, 06:56 AM
Last activity: Feb 28, 2025, 08:06 AM
Last activity: Feb 28, 2025, 08:06 AM