2026年1月7日

shell字符串操作

摘要: 字符串变量string中含有=,如何提取=左边或右边的内容 提取=右边内容 ${string#*=}提取=左边内容 ${string%=*} 💡 原理详解 这两种语法都属于Shell的参数扩展中的模式删除操作 1. 提取右边内容 ${string#*=} #表示从字符串开头(左边)匹配并删除模式。 阅读全文

posted @ 2026-01-07 09:51 Karlkiller 阅读(3) 评论(0) 推荐(0)

导航