commit e7562bf01f5baee2768f2655c715a5595f30eff8
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2022-08-15T13:56:55Z |
| subject | Fixed unary operator error |
commit e7562bf01f5baee2768f2655c715a5595f30eff8
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2022-08-15T13:56:55Z
Fixed unary operator error
---
bash/rbashrc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bash/rbashrc b/bash/rbashrc
index 0789e55..5397b09 100644
--- a/bash/rbashrc
+++ b/bash/rbashrc
@@ -20,7 +20,7 @@ RHOSTNAME="<HOSTNAME>"
RDOMAIN="<DOMAIN>"
RCOLOR="<RCOLOR>"
-if [ $RHOSTNAME == "<HOSTNAME"">" ]; then
+if [ "$RHOSTNAME" == "<HOSTNAME"">" ]; then
RHOSTNAME="\u"
RDOMAIN="@"$( hostname -s )
RCOLOR=$(( $RANDOM * 6 / 32767 + 1 ))