如何转换包含glob字符的字符串,如
原文链接:https://www.f2er.com/bash/386851.html/var/lib/gems/*/bin
转换成符合模式的冒号分隔的文件名(即PATH兼容)字符串?
即echo / var / lib / gems / * / bin将返回
/var/lib/gems/1.8/bin /var/lib/gems/1.9.1/bin
我想要
/var/lib/gems/1.8/bin:/var/lib/gems/1.9.1/bin
代替.