运行bash脚本时,我收到以下错误:
./hi.sh:line 19:语法错误:意外的文件结束
这是我的代码:
#!/bin/bash
#Remove unauthorized users
for line in ./unauthorized_users.txt; do
sudo userdel $line -y
sudo rm -rf "/home/$line" -y
#Remove unauthorized packages
for line in ./bad_packs.txt; do
sudo apt-get remove $line -y
sudo apt-get purge $line -y
Run Code Online (Sandbox Code Playgroud)
请告诉我该怎么做.
bash ×1