Created
April 22, 2022 04:50
-
-
Save showgo001/35bd92978d29026fbdac70fa43bc261e to your computer and use it in GitHub Desktop.
convert circle-number symbol into number and underscore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function convert { | |
arr=$1 | |
for (( i = 0; i < ${#arr[@]}; ++i )) | |
do | |
if[ i > 9 ] then pad = i | |
else pad = 0${i} | |
fi | |
zmv -nW '*${arr[$i]}*' '*${pad}_*' | |
done | |
} | |
arr=("⓪" "①" "②" "③" "④" "⑤" "⑥" "⑦" "⑧" "⑨" "⑩" "⑪" "⑫" "⑬" "⑭" "⑮" "⑯" "⑰" "⑱" "⑲" "⑳" "㉑" "㉒" "㉓" "㉔" "㉕" "㉖" "㉗" "㉘" "㉙" "㉚" "㉛" "㉜" "㉝" "㉞" "㉟" "㊱" "㊲" "㊳" "㊴" "㊵" "㊶" "㊷" "㊸" "㊹" "㊺" "㊻" "㊼" "㊽" "㊾" "㊿") | |
convert arr | |
arr=("⓿" | |
"❶" "❷" "❸" "❹" "❺" "❻" "❼" "❽" "❾" "❿" | |
"⓫" "⓬" "⓭" "⓮" "⓯" "⓰" "⓱" "⓲" "⓳" "⓴" ) | |
convert arr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment