5

Is there any reason to escape a dot in a bash filename expansion?

view full story
linux-howto

http://unix.stackexchange.com – 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} (HowTos)