我想替换字符串
/opt/local/lib/ruby/gems/1.8/gems/cucumber-0.3.99/lib/cucumber.rb
用字符串
/opt/local/lib/ruby/gems/1.8/gems/cucumber-0.3.99/lib/
在命令行上,可能使用 sed。我一生都无法弄清楚要传递给 sed 的替换正则表达式。或者 sed 甚至不是完成这项工作的正确工具。任何帮助,将不胜感激。
shell regex sed
regex ×1
sed ×1
shell ×1