From 5d6871a0d591beee2f9777de2d711844804b9911 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sat, 24 Nov 2018 20:44:31 -0800 Subject: [PATCH] Updated SC1036 (markdown) --- SC1036.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/SC1036.md b/SC1036.md index e63a73d..fde405b 100644 --- a/SC1036.md +++ b/SC1036.md @@ -28,7 +28,13 @@ Determine what you intended the parenthesis to do and rewrite accordingly. Commo ### Exceptions: -None +Bash allows some parentheses as part of assignment-like tokens to certain commands, including `export` and `eval`. This is a workaround in Bash to allow commands that normally would not be valid: + + eval foo=(bar) # Valid command + echo foo=(bar) # Invalid syntax + f=foo; eval $f=(bar) # Also invalid + +In these cases, please quote the command, such as `eval "foo=(bar)". This does not change the behavior, but stops relying on bash specific parsing quirks. ### Related resources: