In bash, I can make a test condition utilize && and/or || rather than an if/elif/else block.
When applicable, I use tend to use && and/or || rather than building out an if block. Are there any real-world advantages to one construct over the other?
Consider the following examples:
1)
[[ -f /shared_disk/backups/daily.tar.bz2 ]] && echo "the coast is clear" || echo "run the dump"
2)
if [[ -f /shared_disk/backups/daily.tar.bz2 ]]; then
echo "the coast is clear"
else
echo "run the dump"
fi