pid=`ps -ef|grep deploy|egrep -v 'grep'|awk -F '[ ]+' '{print $3}'` if [ $pid -ne 0 ] then kill $pid fi
The above script reports an error “[: =: unary operator expected”
you need to change [$PID – Ne 0] to “[$PID – Ne 0]]”
Similar Posts:
- Kafka official kafka-server-start.sh cannot close Kafka process solution
- Shell Syntax Error: operand expected (error token is “-”)
- No Kafka server to stop error handling of Kafka
- How to Replace log4j with shell Script in Bulk
- Error binary file (standard input) matches when using grep command
- Tokudb engine Install Error: error: percona server is not running with jemalloc
- MySQL Error: the solution of command not found
- [Solved] #Creating Server TCP listening socket *:6379: bind: Address already in use
- unix:///tmp/supervisor.sock no such file
- [Solved] Opatch apply Run Error: OPatch failed with error code 73