mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated SC2006 (markdown)
12
SC2006.md
12
SC2006.md
@@ -1,14 +1,14 @@
|
||||
# Use $(..) instead of legacy \`..\`
|
||||
|
||||
### Problematic code:
|
||||
### Problematic code
|
||||
|
||||
echo "Current time: `date`"
|
||||
|
||||
### Correct code:
|
||||
### Correct code
|
||||
|
||||
echo "Current time: $(date)"
|
||||
|
||||
### Rationale:
|
||||
### Rationale
|
||||
|
||||
Backtick command substitution `` `..` `` is legacy syntax with several issues.
|
||||
|
||||
@@ -20,4 +20,8 @@ Backtick command substitution `` `..` `` is legacy syntax with several issues.
|
||||
|
||||
### Exceptions
|
||||
|
||||
None.
|
||||
None.
|
||||
|
||||
### See also
|
||||
|
||||
- http://mywiki.wooledge.org/BashFAQ/082
|
Reference in New Issue
Block a user