Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
鉴于它似乎是您要删除的固定大小的前缀,您可以使用
projectname=${projectname:8}
从值中修剪前 8 个字节。
pn=$(echo "${projectname}" | cut -d'G' -f2)
上面的工作,也是。