Hello,
I'd like to refresh the stdoutput. Suppose that I have the following program
BEGIN{
print "execution";
for(i = 0; i<4; i++)
print i;
}
the output is
execution
0
1
2
3
rather I would like to refresh the stdouput as the for loop runs, thus just one line of the stdoutput updates its...
Hi,
how do you count the length of an array?
The command "length" works for strings, what I do is to scan the array with a for loop and increment a counter by one until the end of the array. Is there any other smarter way to do it ?
Thank you in advance.
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...
Hi feherke,
thank you for your reply. I think my problem is the new line because after splitting and removing "()"if I use "length" on "00r1" I get 5 rather than four. The same for r11 at line 0x20F8.
However, I tried your code fragment, it doesn't work properly.
For example on the line 0x20F8...
Hi,
I would lie to know how to remove the new line from a string.
Googling I found the command prints(%s, $0) that is not what I'm looking for.
I have to parse a file like the following one
000020E0 3D 20 00 40 lis r9,400000
000020E4 39 29 A0 00 addi r9,-6000
000020E8 80 09 00...
Hi,
I want to replace "(" and ")" with "". Suppose that you have a string like 00(r1) I would like to have 00r1.
To this end, I wrote:
regexp = "[\)\)]";
sub(regexp,"",r[i]);
where r[i] is the variable where I store the string 00(r1).
With the former code, I get 00(r1) -> 00(r1
I also tried...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.