I'm trying to make a script what automatically replace a word in the text file.
In a.v,
BIRA_0 0
BIRA_1 400
BIRA_2 800
BIRA_3 C00
...
in b.v,
BIRA_0[25:0]
BIRA_0[95:26]
BIRA_0[125:96]
BIRA_0[255:125]
BIRA_1[5:0]
BIRA_1[25:6]
...
Result,
0[25:0]
0[95:26]
0[125:96]
0[255:125]
400[5:0]
400[25:6]
...
Of course, I can use
$sed "s/BIRA_0/0/" b.v > result
but the problem is that the file a.v
contains many such replacement cases, so I'd like to make it automatically by Cshell script.