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
Post a Comment