📅  最后修改于: 2022-03-11 14:56:52.854000             🧑  作者: Mango
代码示例6
#!/bin/bash
input="$1"
reverse=""
len=${#input}
for (( i=$len-1; i>=0; i-- ))
do
reverse="$reverse${input:$i:1}"
done
echo "$reverse"