[GTALUG] Script to show HTTP(S) and TLS details for a website
Chris F.A. Johnson
chris at cfajohnson.com
Mon Aug 12 15:45:32 EDT 2019
On Mon, 12 Aug 2019, Giles Orr via talk wrote:
> Well damn.? That's a lot of very good suggestions.
>
> I will dispute one of them: you said (more than once I think) that I don't need to quote variables.? You are technically correct ... right up until a variable value has a space in it.? Then everything goes to
> hell in a handbasket.?
Yes, always quote them. And it is not only spaces that can be a
problem; several other characters are special to the shell and can
cause problems.
But it is not necessary to use braces unless you need more than
straight expansion:
echo "$var"
not:
echo "${var}"
--
Chris F.A. Johnson <http://cfajohnson.com/>
=========================== Author: ===============================
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Pro Bash Programming: Scripting the GNU/Linux shell (2009, Apress)
More information about the talk
mailing list