I am working with a bash script that someone else wrote and I see the following line:
cp -v ${LOG_DIR}/${APPLICATION}\.*.log ${ARCHIVED_LOG_DIR}
The files with which it's working are all named like:
EXAMPLE.command1.log
EXAMPLE.command2.log
Is there any reason for the backslash escaping the dot since a dot isn't treated specially in filename expansions? What are the implications of doing this vs without the backslash as such?:
cp -v ${LOG_DIR}/${APPLICATION}.*.log ${ARCHIVED_LOG_DIR}
.is not a character that needs quoting, it looks like the backslash is entirely extraneous. It may be a typo, or the person who wrote that line just felt like adding a backslash?