From ad1e7d25d510e16c46fb6a1f4b5ee1c2809540aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A9TriMoon=E2=84=A2?= Date: Sat, 13 Mar 2021 14:27:02 +0300 Subject: [PATCH] improvement to explanation. --- SC2064.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SC2064.md b/SC2064.md index c4c12e6..9ee512a 100644 --- a/SC2064.md +++ b/SC2064.md @@ -16,7 +16,7 @@ trap 'echo "Finished on $(date)"' EXIT With double quotes, all parameter and command expansions will expand when the trap is defined rather than when it's executed. -In the example, the message will contain the date on which the trap was declared, and not the date on which the script exits. +In the example with the Problematic code, the message will contain the date on which the trap was declared, and not the date on which the script exits. Using single quotes will prevent expansion at declaration time, and save it for execution time.