Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个 test.sh 脚本:
if tesseract --version >/dev/null 2>&1; then echo Found else echo Not found fi
如果我执行./test.sh,它会打印 Found,但如果我使用 sudo 执行它sudo ./test.sh,那么它会说未找到。有什么帮助吗?:)
./test.sh
sudo ./test.sh