CompTIA Linux+ XK0-005 Practice Question
Which command demonstrates the correct use of the '||' operator in a shell script to execute a backup script only if the primary backup command fails?
/usr/local/bin/backup-fallback.sh || tar czf /backup/primary.tar.gz /data
tar czf /backup/primary.tar.gz /data && /usr/local/bin/backup-fallback.sh
tar czf /backup/primary.tar.gz /data | /usr/local/bin/backup-fallback.sh
tar czf /backup/primary.tar.gz /data || /usr/local/bin/backup-fallback.sh