I have a script to decrypt an encrypted file - but I only want to do it if the file exists.
bash -c "openssl rsautl -decrypt -inkey key.pem -in encrypted.dat -out decrypted.txt"
Is there an easy way to only do this if the .dat file exists?
I have a script to decrypt an encrypted file - but I only want to do it if the file exists.
bash -c "openssl rsautl -decrypt -inkey key.pem -in encrypted.dat -out decrypted.txt"
Is there an easy way to only do this if the .dat file exists?
if [ -e encrypted.dat ]; then echo exists; else echo does not exist; fi