domenicodl
Programmer
hello,
I wrote a very elementary awk script that takes two files in input. One of the two files is used to select the rows of the other one.
The file pctrace is used to extract the line from the file disassembly.
Here's a snapshot of both:
pctrace
"2000"
"2004"
disassembly
00002000 3D 20 00 40 lis r9,400000
00002004 39 29 A0 00 addi r9,-6000
00002008 80 09 00 00 lwz r0,00(r9)
I remove the first four zero in the first field of disassembly and then I compare. For this example with the file pctrace I can select only the first two lines.
Now the problem is that my script works fine when I use it with a "handmade" pctrace (I wrote it with nano), but it doesn't work when I use the file pctrace.csv (that I get from a database).
Those two files are identical to me.
I have attached all the files needed to execute the program, can someone take a look at it them, please?
The script is about 10 lines code (qute stupid).
To invoke the script I use the command awk -f pctrace disassembly
for the second file obviously awk -f pctrace.csv disassembly
Thank you in advance
I wrote a very elementary awk script that takes two files in input. One of the two files is used to select the rows of the other one.
The file pctrace is used to extract the line from the file disassembly.
Here's a snapshot of both:
pctrace
"2000"
"2004"
disassembly
00002000 3D 20 00 40 lis r9,400000
00002004 39 29 A0 00 addi r9,-6000
00002008 80 09 00 00 lwz r0,00(r9)
I remove the first four zero in the first field of disassembly and then I compare. For this example with the file pctrace I can select only the first two lines.
Now the problem is that my script works fine when I use it with a "handmade" pctrace (I wrote it with nano), but it doesn't work when I use the file pctrace.csv (that I get from a database).
Those two files are identical to me.
I have attached all the files needed to execute the program, can someone take a look at it them, please?
The script is about 10 lines code (qute stupid).
To invoke the script I use the command awk -f pctrace disassembly
for the second file obviously awk -f pctrace.csv disassembly
Thank you in advance