发新话题
打印

Linux shell变量长度表达式

Linux shell变量长度表达式

str="this is a string"
n=${#str}
echo "Length of the string is : $n "

参考:
https://www.geeksforgeeks.org/how-to-find-length-of-string-in-bash-script/

[ 本帖最后由 linda 于 2023-2-24 15:53 编辑 ]

TOP

发新话题