冒号改成分号
截图
场景控制脚本(上)
vi monitor_man.sh
-------------
#!/bin/bash
resettem=$(tput sgr0)
declare -A ssharray
i=0
numbers=""
for script_file in `ls -I "monitor_man.sh" ./`
do
echo -e "\e[1;35m" "The Script:" ${i} '==>' ${resettem} ${script_file}
i=(($i+1))
done
## monitor.sh #!/bin/bash T=$(tput sgr0) #终端初始化赋值变量 declare -A ssharray #定义一个关联数组键值对,键-脚本号码,值-文件名 i=0 numbers="" for script_file in `ls -I "monitor_man.sh" ./` #ls -I排除过滤 do echo -e '\e[1;30m' "XXXXX:" $i '===>' $T ${script_file} i=$((i+1)) done