Add example for testing equality

Daniel Heater
2019-04-19 10:01:53 -05:00
parent d9d1d4d9a5
commit ffebea16e1

@@ -23,6 +23,26 @@ a="$(printf '%b_' ' \t\n')"; a="${a%_}" # protect trailing \n
Want some good news? See http://austingroupbugs.net/view.php?id=249#c590.
### Testing Equality
`==` operator is not supported in POSIX `sh`
Bash:
```Bash
if [ "$a" == "$b" ]; then
echo "equal"
fi
```
POSIX:
```sh
if [ "$a" -eq "$b" ]; then
echo "equal"
fi
```
### `$"msgid"`
Bash: