📅  最后修改于: 2022-03-11 14:56:49.701000             🧑  作者: Mango
declare -a cols
while read num color; do
cols[$num]=$color
done < file.txt
for key in "${!cols[@]}"; do printf "%s\t%s\n" "$key" "${cols[$key]}"; done