这些错误表明脚本中存在 Windows 风格的换行符 (\r),导致在 Linux 中执行时出现问题
root@firefly:/home/firefly# bash ./firefly_record.sh
./firefly_record.sh:行1: $'\r':未找到命令
./firefly_record.sh:行3: $'\r':未找到命令
./firefly_record.sh:行22: 未预期的符号“$'do\r'”附近有语法错误
'/firefly_record.sh:行22: `for interface in "${interfaces[@]}"; do
使用 dos2unix 命令将脚本文件转换为适合在 Linux 上运行的格式。在终端中执行以下命令: