我通过 crontab 运行加密的 shell 脚本,同时通过ps -ef | grep 脚本名称它以纯文本形式显示进程以及脚本代码
# ps -ef | grep test_script.x
root 5134 2901 0 12:16 pts/3 00:00:00 ./test_script.x -c
#!/bin/bash if [ `echo $?` == 0 ]; then echo "This is my test script" apt-get update else echo "This is end test script" fi sleep 3 ./test_script.x
root 5164 15802 0 12:16 pts/0 00:00:00 grep --color=auto test_script.x