zhongjiajie commented on a change in pull request #6782:
URL: https://github.com/apache/dolphinscheduler/pull/6782#discussion_r750858848
##########
File path: install.sh
##########
@@ -21,6 +21,15 @@ workDir=`cd ${workDir};pwd`
source ${workDir}/conf/config/install_config.conf
+charEscape(){
+ inputParam=$1
+ if [[ $1 =~ '@' ]]; then
+ tmp=$(echo inputParam | sed "s/@/\\\\@/g")
Review comment:
It seem we miss shell variable syntax here @tracehh
```suggestion
tmp=$(echo ${inputParam} | sed "s/@/\\\\@/g")
```
but the most important thing is, could we reduce the complexity of function?
maybe just
```shell
function charEscape(){
echo ${1//@/\\\\@}
}
```
according to https://stackoverflow.com/a/2871187/7152658, and this work on
my env, with
* OS: mac
* Bash: GNU bash, version 5.1.8(1)-release (x86_64-apple-darwin19.6.0)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]