mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
+syntax (sh)
@@ -28,7 +28,7 @@ If you want to check the exit status of a certain command, use that command dire
|
||||
|
||||
If you want to check the output of a command, use `"$(..)"` to get its output, and then use `test` or `[`/`[[` to do a string comparison:
|
||||
|
||||
```
|
||||
```sh
|
||||
# Check output of `whoami` against the string `root`
|
||||
if [ "$(whoami)" = "root" ]
|
||||
then
|
||||
|
Reference in New Issue
Block a user