mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-09-21 00:38:17 +03:00
224 B
224 B
if
Simple shell conditional
- Echo a different thing depending on a command's success.
{{command}} && echo "success" || echo "failure"
- Full if syntax.
if {{condition}}; then echo "true"; else echo "false"; fi