- TOKEN_ID=$(grep "\--token " ./${LOG_FILE} | cut -f5 -d' ')
- TOKEN_CA_SH256=$(grep "\--discovery-token-ca-cert-hash " ./${LOG_FILE} |cut -f2 -d':')
+ TOKEN=$(grep "\--token " ./${LOG_FILE})
+ TOKEN_ID=$(echo ${TOKEN#*"token "}|cut -f1 -d' ')
+
+ SH256=$(grep "\--discovery-token-ca-cert-hash " ./${LOG_FILE})
+ TOKEN_CA_SH256=${SH256#*"sha256:"}