【转】shell脚本执行时报"bad interpreter: Text file busy"的解决方法
转自:https://www.cnblogs.com/ybluo/p/7397426.html
问题描述:
在Linux环境下执行sh脚本提示: -bash: ./uac-app.jar: /bin/bash: bad interpreter: Text file busy
2)问题原因:
This happens because the script file is open for writing, possibly by a rogue process which has not terminated.
3)解决办法:
Solution: Check what process is still accessing the file, and terminate it.
Run lsof
(list open files command) on the script name:
lsof | grep while-count
cat 17653 me 1w REG 8,1 148 181517 /home/me/test/while-count
kill -9 17653
Now try running the script again. It works now.