The bit in question seems innocuous enough:
if ! dpkg -l | grep -q obexftp; then echo "You must install obexftp to run this script" exit 1
Would it make a difference if run in a subshell like this:
if ( ! dpkg -l | grep -q obexftp ); then echo "You must install obexftp to run this script" exit 1
or better yet, is there a better way to determine if a package is installed?
The bit in question seems innocuous enough:
if ! dpkg -l | grep -q obexftp; then
echo "You must install obexftp to run this script"
exit 1
Would it make a difference if run in a subshell like this:
if ( ! dpkg -l | grep -q obexftp ); then
echo "You must install obexftp to run this script"
exit 1
or better yet, is there a better way to determine if a package is installed?