Character Escaping

Some characters need to be escaped within a dynamically expanded string %{…​}. The % character is used for variable expansion, so a literal % character can be created by using %%.

Other than within a dynamically expanded string, very little character escaping is needed. The rules of the enclosing string context determine whether or not a space or " character needs to be escaped.