1、从test.sh中查找root@localhost:的行并赋值给aa
aa=$(sed -n '/root@localhost:/p' test.sh)
echo $aa
s generated for root@localhost:YbitKorHK3<T
2、echo ${aa#*:}
删除: 号及左边的所有字符
bb=$(echo ${aa#*:})
echo $bb
YbitKorHK3<T