HI,
enquanto executa um script, eu tenho o erro abaixo mencionados.
/ bin / sh: line10: [: \u003d: unary operador esperado. Tentei acompanhar a solução para este tipo de problema que é "Citando as variáveis", mas é invain. Pode qualquer um ajudar-me a resolver o problema? Estou colando o conteúdo real do script below.plz verificá-lo. Estou tendo problemas com o código em vermelho.
Código:
supportedMozillaVersion() {
case "$*" in
*rv:1.[7-9]*) return 0;;
*rv:[2-9].[0-9]*) return 0;;
*rv:*) return 1;;
Mozilla\ 1.[7-9]*) return 0;;
Mozilla\ [2-9].[0-9]*) return 0;;
*) return 1;;
esac
}
supportedFirefoxVersion() {
case "$*" in
*Firefox\ [1-9].*) return 0;;
*Firefox/[1-9].*) return 0;;
*Firefox*) return 1;;
*rv:1.[7-9]*) return 0;;
*rv:[2-9].*) return 0;;
*rv:*) return 1;;
Mozilla*\ 1.[7-9]*) return 0;;
Mozilla*\ [2-9].[0-9]*) return 0;;
*) return 1;;
esac
}
whichBrowser=NoBrowser
case "$0" in
/*) fullpath=$0;;
*) fullpath=`pwd`/$0;;
esac
installsourcepath=`echo "$fullpath" | sed "s,/\./,/,g; s,/[^/][^/]*/\.\./,/,g; s,//,/,g; s,/[^/]*$,,"`
if [ "$BROWSER" ]; then
if versionString=`($BROWSER -version) 2>/dev/null`; then
case "$versionString" in
*Firefox*) if supportedFirefoxVersion "$versionString"; then
whichBrowser=Firefox
fi ;;
*Mozilla*) if supportedMozillaVersion "$versionString"; then
whichBrowser=Mozilla
fi ;;
esac
fi
fi