Am learning bash and it's confusing how (why) this line of code if [$1 = ]; then
works. Can someone please explain.
From bash tuturial here under File re-namer (6th block)
# a quick check to see if any files were given
# if none then it's better not to do anything than rename some non-existent
# files!!
if [$1 = ]; then
echo "no files given"
exit 0
fi