I'm looking for the best way to check if gpg-agent is installed in a a machine. I need to check from a shell script.
Thank you.
You may have to modify the path. Tested with RHEL 6 and 7.
if test -x /usr/bin/gpg-agent; then echo installed; else echo not installed; fi
Or:
if [ -x /usr/bin/gpg-agent ]; then echo insatlled; else echo not installed; fi
Further Reading: help test
.