ksh - Error in my Shell Script (at kill command) -


#!/bin/ksh ssh user@hostname "ps -ef | grep java | grep dev | kill -9 `awk '{print \$2}'` && nohup java -jar application.jar --server.port=8090&" 

error:

usage: kill [-ll] [-n signum] [-s signame] job ...    or: kill [ options ] -l [arg ...] 

does know causing error?

the \ in awk print syntax error.

try this:

ps -ef | grep java | grep dev | kill -9 `awk '{print $2}'` 

Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -