+syntax (sh)

KisaragiEffective
2020-10-04 12:07:24 +09:00
parent daa6805b69
commit 8281750456

@@ -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: 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` # Check output of `whoami` against the string `root`
if [ "$(whoami)" = "root" ] if [ "$(whoami)" = "root" ]
then then