9 Jan
2017
9 Jan
'17
8:26 p.m.
On Mon, 9 Jan 2017, Bob Jonkman via talk wrote:
Chris F.A. Johnson wrote:
newName="${oldname}-bkp-${filedate}.${extension}.old"
The braces are not necessary here.
Are braced incorrect here? I've been putting braces around all variable names, so that there are fewer syntax exceptions for me to remember...
They are not incorrect, just unnecessary. The only time they are necessary is when the variable name is followed by a character that is legal in a variable name. Or when modifying the output of the variable expansion. -- Chris F.A. Johnson, <http://cfajohnson.com>