I wrote a 2 line bash script file in Centos 6.8
#! /bin/sh
pid= ps -ef | grep -i 'adminserver' | grep -v grep | awk '{print $2}'
kill -9 $pid
when I run the script i get the following output:
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]