diff --git a/CEP/LMWCommon/src/cexecms b/CEP/LMWCommon/src/cexecms index 47dcb06dcf3c31942b470faebeaa02473f593eba..37a98f1008d37b4ba264531137ec3fb2b7a18c1d 100755 --- a/CEP/LMWCommon/src/cexecms +++ b/CEP/LMWCommon/src/cexecms @@ -101,6 +101,14 @@ commandnew=`echo "$command" | sed \ -e 's%"%:DQUOTE:%g' \ -e "s%'%:SQUOTE:%g" \ -e 's%\\$%:DOLLAR:%g'` +# Furthermore it expands the nameglob, so change that as well. +nameglobnew=`echo "$nameglob" | sed \ + -e 's%\*%:ASTERISK:%g' \ + -e 's%\?%:QUESTIONMARK:%g' \ + -e 's%\[%:LBRACKET:%g' \ + -e 's%\]%:RBRACKET:%g' \ + -e 's%{%:LBRACE:%g' \ + -e 's%}%:RBRACE:%g'` -cexec $cluster cexecms-part -e "$envfile" "'$commandnew'" "$nameglob" "$@" +cexec $cluster cexecms-part -e "$envfile" "'$commandnew'" "$nameglobnew" "$@" rm -f "$envfile" diff --git a/CEP/LMWCommon/src/cexecms-part b/CEP/LMWCommon/src/cexecms-part index c34d6503ba0941a3f1bf28d77f61e0b029dced9e..da7538f74e311b19be70db90860b5b3669122e4f 100755 --- a/CEP/LMWCommon/src/cexecms-part +++ b/CEP/LMWCommon/src/cexecms-part @@ -46,8 +46,15 @@ if test "$envfile" != ""; then . $envfile fi -# Find all matching files (first substitute # by [0-9]). -nameg=`echo "$nameglob" | sed -e 's%#%[0-9]%g'` +# Find all matching files (first substitute # by [0-9] and substitute special characters back). +nameg=`echo "$nameglob" | sed \ + -e 's%#%[0-9]%g' \ + -e 's%:ASTERISK:%*%g' \ + -e 's%:QUESTIONMARK:%?%g' \ + -e 's%:LBRACKET:%[%g' \ + -e 's%:RBRACKET:%]%g' \ + -e 's%:LBRACE:%{%g' \ + -e 's%:RBRACE:%}%g'` names=`ls -d $nameg 2>&1` if test $? != 0; then echo "No file matching $nameg found"