Knowledge Base
Single line conditional statement
Example #1
[ ! -f $file ] && cp -v 00__template__sections.php $file
Example #2
findmnt -D |grep -i sshfs; if [ $? -eq 1 ]; then sshfs digital-dave:/home/do_dave/ /home/dave/sshfs/digital_dave/ ; else echo "do_dave already mounted"; fi