【发布时间】:2012-05-10 07:58:57
【问题描述】:
我想在 verilog 端口列表之后附加一些代码,格式如下:
module module_name (
input wire in1,
input wire in2,
output wire out1
);
我正在寻找有关如何使用 sed(或其他命令)查找以“module”开头并以“);”结尾的端口列表的帮助。然后在 ");" 之后的行添加一些代码
命令:
sed '/^module/,/);/a code to append' test.v
在匹配序列中的每一行上放置“要附加的代码”,而不仅仅是在它之后
module module_name (
code to append
input wire in1,
code to append
input wire in2,
code to append
output wire out1
code to append
);
code to append
【问题讨论】:
标签: sed