如何从数字中获取第一个数字?例如,25 - 仅从 25 中获取“2”。
这是我尝试过的:
echo -n "Enter age: " read age echo $(s:0:1)
centos shell-script
centos ×1
shell-script ×1