Без кавычек ругается #!/bin/sh VERSION=$(java -jar jboss-cache-jdk50.jar |grep Version | awk '{print $2}') echo "Current jboss-cache version: $VERSION" if [ $VERSION == "1.4.1.SP15" ]; then echo "JBoss Cache Version is 1.4.1.SP15. Update is not needed." else #cd /usr/local/jboss/server/default/lib #mv jboss-cache-jdk50.jar jboss-cache-jdk50.jar1.4.1.SP13 #mv jboss-cache-jdk50.jar1.4.1.SP13 /var/backups #wget https://repository.jboss.org/jboss/cache/1.4.1.SP15-brew/lib/jboss-cache-jdk50.jar #VERSION=$(java -jar jboss-cache-jdk50.jar |grep Version | awk '{print $2}') echo "Updated jboss-cache version: $VERSION" fi /root/jboss-cache-update.sh: 5: [: 1.4.1.SP15: unexpected operator
Обсуждают сегодня