我想说,这样颜色输出更好记,前面就不用声明变量了,
#!/bin/bash
declare -A ss
i=0
numbers=""
for script_file in $(ls -I "mon" ./)
do
echo -e "\e[1;35m The Script: ${i} ==> \e[1;0m" ${script_file}
ss[$i]=${script_file}
numbers="${numbers} | ${i}"
i=$((i+1))
done
echo ${numbers}
#!/bin/bash
declare -A ss
i=0
numbers=""
for script_file in $(ls -I "mon" ./)
do
echo -e "\e[1;35m The Script: ${i} ==> \e[1;0m" ${script_file}
ss[$i]=${script_file}
numbers="${numbers} | ${i}"
i=$((i+1))
done
echo ${numbers}
2017-08-03