面试题答案
一键面试#!/bin/bash
text='The old dog runs fast. The old cat jumps high. The old bird flies away'
new_text=${text//old/young}
sentences=(${new_text//./ })
for sentence in "${sentences[@]}"; do
length=${#sentence}
echo "句子长度: $length"
done