Chinaunix

标题: shell 字符串的替换 [打印本页]

作者: jackseans    时间: 2012-12-06 16:14
标题: shell 字符串的替换
[chengmo@localhost ~]$ test='c:/windows/boot.ini'
[chengmo@localhost ~]$ echo ${test/\//\\}
c:\windows/boot.ini

[chengmo@localhost ~]$ echo ${test//\//\\}
c:\windows\boot.ini
这两个字符串的替换 看不明白 请高手解释下




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2