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 gkittelson 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. New2awk

    writing awk commands into a file

    Thanks this is much shorter than the way I did it in vba, but can you explain me this line? if (!done[name]) I searched for "done" but couldn't find anything suitable.
  2. New2awk

    writing awk commands into a file

    Good morning;) Aehm it's like this: <Service VariantName="A_Name" Version="7.5" ......> <Aps Name="INTY1O7K0200" Status="bringUp" ......> <Aps Name="INTY1O7K0190" Status="bringUp" ......> .. .. <Service VariantName="NameB" Version="7.5" ......> <Aps Name="INTY1O7K0300" Status="bringUp"...
  3. New2awk

    writing awk commands into a file

    Hey well "exit" didn't work for me in the way I wanted to use it, but anyway I had to load the .txt file into an excel worksheet where I now just deleted the double/tribble... entries with a VBA Makro regards
  4. New2awk

    writing awk commands into a file

    Hey is it actually possible to set a limit? What I mean is that after the line with "VariantName" it can appear that there is more than one "Name" that has the status "bringUp", but I only need the first Name with the status "bringUp". Can I somehow stop it after one Name with bringUp has been...
  5. New2awk

    writing awk commands into a file

    Hi okay that was somekind of easy ^^ And again thank you Feherke.
  6. New2awk

    writing awk commands into a file

    Hey again ;) Now i have another problem: I still search for lines with "Status="bringUp"" but now, if a line has been found I want to get into the line above and write the VariantName + the Name into a file <Service VariantName="A_Name" Version="7.5" ......> <Aps Name="INTY1O7K0200"...
  7. New2awk

    writing awk commands into a file

    Thank you Feherke works perfect now :)
  8. New2awk

    writing awk commands into a file

    <Aps Name="ZZ1V7A851601" Status="bringUp" Type="delta" ForcedOnline="no"/> -> bringUp.txt Name="ZZ1V7A851601" -> New.txt and that's what Neu.txt should look like: ZZ1V7A851601 I didn't know how to specify the parameters for each command and i hoped that might work
  9. New2awk

    writing awk commands into a file

    Hi and thank you ;) 2) works fine now but 1) I tried some stuff now but it still doesn't work: BEGIN { ORS="\r\n" } {if ($2=="Status=\"bringUp\"") print $4 > "New.txt"; # else if ($3=="Status=\"bringUp\"") print $2 > "New.txt";#This part works else if($4=="Status=\"bringUp\"") print $3 >...
  10. New2awk

    writing awk commands into a file

    Now I've got a second problem. If I open the the file "Neu.txt" in Windows the word-wraps don't exist there are only these small quads. Is there a way I can fix this?
  11. New2awk

    writing awk commands into a file

    Hi I wrote some lines in awk and now I wanted to write them into a file, but there always occur some errors. Hope someone can help me. awk '/bringUp/' V03_autsfce12_26-07-05.xml > bringUp.txt awk '{if ($2=="Status=\"bringUp\"") print $4 > "New.txt"; else if ($3=="Status=\"bringUp\"") print $2...
  12. New2awk

    Awk question - Suppose I have a file called Test1 with the ....

    .....following data: field1^Vfield2^V^field3^Vfield4 I need to take the data from test1 and output it into test2 but where i can specify the order that the fields come out. I have tried to cut the fields using the following command grep &quot;f&quot; test1 | cut f 4,3,2,1 -d&quot;^V&quot; >>...

Part and Inventory Search

Back
Top