linux shell脚本截取字符串的八种方式

 创建文件: vim shell01.sh echo "=====截取字符串的八种方式======" string="http://localhost:8080/myprogram/index.html" echo ${string} echo '#*//从左边开始, 删除//左边的值,保留右边的值  '${string#*//} echo '#//*无法截取,#只能从左侧截取,截去左边的值'
相关文章
相关标签/搜索