Hello all,
I have a verilog file as following (part of it):
old.v:
+
I want to replace the ".bit_wen" and corresponding "dva_bit_wr_en_e" as follows:
basically right now I am manually typing in these in vim, and there are a bunch of these type of port mapping (for example rd_adr1, wr_adr etc) issues that I have to break down bit by bit.
Any script in Python/Awk would help my life tremendously..
I have attached the "lsu.v" file. I am trying to change stuff inside the block "bw_r_dcd" (line: 1919):
Here I need to change ".dcache_rdata_wb" to ".dcache_rdata_wb63", ".dcache_rdata_wb62",......".dcache_rdata_wb0". Correspondingly, "dcache_rdta_wb[63:0]" needs to be changed to "dcache_rdata_wb[63]", "dcache_rdata_wb[62]" ..... "dcache_rdata_wb[0]".
Once I do this, then I need to take similar approach in the block for ".dcache_rdata_msb_w0_m", ".dcache_rdata_msb_w1_m" etc...
I wrote the script as suggested by RudiC as follows:
Still didn't work. Apparently it deleted the line corresponding to ".dcache_rdata_wb" from the file.
I have file .
cat hello.txt
Hello World
I would like to append a string "Today " so the output is
cat hello.txt
Hello World Today
I dont know which line number does the "Hello World" appears otherwise I could have used the Line number to search and append . (3 Replies)
Hi,
I have gigabytes of text files that I need to search for "&" and replace with "&". Is there a way to do this efficiently (like sed command)?
Hope you could help.
Thanks. (17 Replies)
HI
I have property files having content
QA_server_name=10.232.54.7
QA_port_number=18000
DEV_server_name=10.235.60.73
DEV_port_number=18000
and a .jason file having content like this
{
"server":"localhost"
"port":"17000"
------
}
I will get the parameter... (1 Reply)
Hi
I am trying to search for a particular occurrence of a string in a file, and if found, append another string to the end of that line.
Here is my file contents:
column1 userlist default nowrite=3 output=4
column2 access default nowrite=3
Here is the code:
A="user=1... (1 Reply)
Hi all,
I have output files that are all text files with various different extensions.
So, if I submit the input file "job_name.inp", when it finishes I get an output file "job_name.dat". A typical input file looks something like this:
$CONTRL SCFTYP=RHF RUNTYP=ENERGY MAXIT=199 MULT=1... (4 Replies)
Hello,
I am trying to search and replace but I don't know how to do it. My simple knowlegde in search and replace using sed is not helping me at all.
File:
its a cause value #22: dfg ggg
Cause value #1: aasfa fasdf
asfa value #22: affg gggg
Basically i want to replace the... (6 Replies)
I have 100+ python files in a single directory. I need to replace a specific path occurrence with a variable name.
Following are the find and the replace strings:
Findstring--"projects\\Debugger\\debugger_dp8051_01\\debugger_dp8051_01.cywrk"
Replacestring--self.projpath
I tried... (5 Replies)
I have a text file with following content (3 lines)
filename : output.txt
first line:12/12/2008
second line:12/12/2008
third line:Y
I would like to know how we can replace 'Y' with 'N' in the 3rd line keeping 1st and 2nd lines same as what it was before.
I tried using cat output.txt... (4 Replies)
script is as below
v_process_run=5
typeset -i p_cnt=0
pdata=/home/proc_data.log
while
do
# execute script in background
dummy_test.sh "a1" "a2" &
p_cnt=$p_cnt+1
echo "data : $p_cnt : Y" >> $pdata
done
file created with following data in... (1 Reply)
Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)