Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. domenicodl

    Refresh stdoutput

    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...
  2. domenicodl

    array lenght

    GNU AWK 3.1.6
  3. domenicodl

    array lenght

    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.
  4. domenicodl

    Parsing a file with a script

    Thank you for this final remark, very interesting. Anyway I will be checking how to display the carriage return with nano.
  5. domenicodl

    how to remove new line

    Tried, bug fixed !! :)
  6. domenicodl

    how to remove new line

    Thank you, it 's very difficult to find people kind like you
  7. domenicodl

    how to remove new line

    uhm, ok I will check the code around the code fragment you provided to me. Sorry for making you waste time. Thank you.
  8. domenicodl

    how to remove new line

    I'm using awk on Ubutnu
  9. domenicodl

    Parsing a file with a script

    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...
  10. domenicodl

    how to remove new line

    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...
  11. domenicodl

    how to remove new line

    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...
  12. domenicodl

    regexp with round brackets

    Perfect, thank you both :)
  13. domenicodl

    regexp with round brackets

    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...
  14. domenicodl

    for loop doesn't execute

    Thank you very much, both. I adopted the easiest solution, replacing == with <=.
  15. domenicodl

    for loop doesn't execute

    Hello, I have two files, namely file1 and file2 as follows file1: 000020E0 000020E4 file2: 000020E0 3D 20 00 40 lis r9,400000 000020E4 39 29 A0 00 addi r9,-6000 000020E8 80 09 00 00 lwz r0,00(r9) 000020EC 7C 03 03 78 mr r3,r0 000020F0 81...

Part and Inventory Search

Back
Top