From fd4f9b5ad1a3a43ec11f0ece9ca90b058071c37c Mon Sep 17 00:00:00 2001 From: John Gardner Date: Wed, 22 Dec 2021 19:28:49 +1100 Subject: [PATCH] Add highlighting to last code-block --- SC1036.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/SC1036.md b/SC1036.md index fde405b..c8a96f3 100644 --- a/SC1036.md +++ b/SC1036.md @@ -30,12 +30,14 @@ Determine what you intended the parenthesis to do and rewrite accordingly. Commo 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 +```sh +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. +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: -* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc! \ No newline at end of file +* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!