
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chris F.A. Johnson wrote:
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... - --Bob. On 2017-01-09 05:47 PM, Chris F.A. Johnson via talk wrote:
On Sun, 8 Jan 2017, Mauro Souza via talk wrote:
Or nFname="${base}.mp4"
Using brackets you can mix variables and text and create something like this: newName="${oldname}-bkp-${filedate}.${extension}.old"
The braces are not necessary here. This will work fine:
newName="$oldname-bkp-$filedate.$extension.old"
Braces would be necessary if you were using underscores instead of hyphens because they can be part of a variable name:
newName="${oldname}_bkp_$filedate.$extension.old"
- -- - -- Bob Jonkman <bjonkman@sobac.com> Phone: +1-519-635-9413 SOBAC Microcomputer Services http://sobac.com/sobac/ Software --- Office & Business Automation --- Consulting GnuPG Fngrprnt:04F7 742B 8F54 C40A E115 26C2 B912 89B0 D2CC E5EA -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Ensure confidentiality, authenticity, non-repudiability iEYEARECAAYFAlh0I9wACgkQuRKJsNLM5erWdQCgohmGdSVT2s1DHEWs+3+I3BCn nR4AoM8TVyt53lC3KhHC6uecvy09Zq9z =Af5d -----END PGP SIGNATURE-----