我想创建一个脚本,将杀死一个进程,并确认进程正在运行之前发出kill -9命令,我跑到一个错误,它总是假设那里输出。 #!/bin/sh
rc=$?
#Ask to check for a process to kill
clear
echo "Please enter a process number you would like to kill"
echo ""
read pro
这里是我的整个rc.local文件中 #!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error