📅  最后修改于: 2022-03-11 14:59:37.797000             🧑  作者: Mango
代码示例1
var="12345"
copy=${var}
len=${#copy}
for((i=$len-1;i>=0;i--)); do rev="$rev${copy:$i:1}"; done
echo "var: $var, rev: $rev"