Added 2 String Comparison Conditionals (#769)
they check to see if the strings are equal or not... Just thought its an essential comparison that should be in the cheatsheet.
This commit is contained in:
parent
f683f59ce2
commit
0804754a91
2
bash.md
2
bash.md
|
@ -321,6 +321,8 @@ Conditionals
|
||||||
|
|
||||||
| Condition | Description |
|
| Condition | Description |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
|
| `[ STRING = STRING ]` | Equal |
|
||||||
|
| `[ STRING != STRING ]` | Not Equal |
|
||||||
| `[ -z STRING ]` | Empty string |
|
| `[ -z STRING ]` | Empty string |
|
||||||
| `[ -n STRING ]` | Not empty string |
|
| `[ -n STRING ]` | Not empty string |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
|
|
Loading…
Reference in New Issue