【发布时间】:2014-06-14 18:39:45
【问题描述】:
我正在寻找以下文字
get_pins {
替换成
get_pins -hierarchical {proc_top_*/
我尝试过使用sed,但我不确定我做错了什么。我知道您需要在花括号前面加上 #,但我仍然无法让命令正常工作。
我最接近的是这个:
sed 's/get_pins #{#/get_pins -hierarchical #{#proc_top_*\//g' filename.txt > output
但它并没有完成我上面想要的替换。
【问题讨论】:
-
为什么要用
#括起来{?这是不正确的。 -
@starbox,查看更新的答案。我刚刚用
csh测试并重现了你的问题。