I have the following script:
#!/bin/sh -e PWD="supersecretpassword" file="/backup/2do/example.txt" echo before echo $PWD | gpg --passphrase-fd 0 -c $file echo after
The scripts works perfectly fine if executed manually, but simply stops working when the gpg line is performed when performed as crontab.
gpg: cannot open `/dev/tty': No such device or address
I'm grateful for any suggestions!
--no-tty to GPG