3 ms·
largely agree, but stylistically speaking I prefer the following: if ls /tmp/goober test -d /tmp/goober echo "I'll always love you or whateve
by tpoacher 3y ago
largely agree, but stylistically speaking I prefer the following:
if ls /tmp/goober
test -d /tmp/goober
echo "I'll always love you or whatever"
then echo "the grasshopper always jumps higher"
else "never gonna let you down"
fi
i.e. all the commands line up at the 6th column, leaving the if/then/elif/else/fi stuff appearing on the 'margin', as it were.
This works particularly well, visually, when nested ifs are involved.