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