简体   繁体   中英

remote script execution produce errors

I execute groovy script remotely on Linux machine. That produce me error

bash: -c: line 0: syntax error near unexpected token `('

My command is :

ssh user@11.11.11.11 '/home/lib/groovy-1.5.8/bin/groovy -cp jars/log4j.jar\:jars/commons-configuration.jar\:jars/spring.jar:\$(echo jars/c\*.jar | tr ' ' '\:') bin/CreateTable.groovy'

Thanks in advance

You shouldn't need to escape all those characters. Try this:

ssh user@11.11.11.11 '/home/lib/groovy-1.5.8/bin/groovy -cp jars/log4j.jar:jars/commons-configuration.jar:jars/spring.jar:$(echo jars/c*.jar | tr " " ":") bin/CreateTable.groovy'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM