Browse - Programming Tips - How should I declare a constant in bash?

Date: 2016nov7
Language: bash
OS: Linux

Q.  How should I declare a constant in bash?

A.  Use the readonly keyword.  But convention UPPERCASE is used:

readonly FILENAME='/etc/samba/smb.conf'
No spaces around the equals sign. I prefer single quotes for strings.