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 strongm 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. NoobProgrammer

    Importance of the parenthesis "()" <--- ???

    The following are 2 lines that opens a sql connection via the sql .net namespace. The first line does not work, but the second line does. The only difference is the () after the Open function. When I use the VS 2005 IDE, I believe this is optional, but apparently in PowerShell, this is not...
  2. NoobProgrammer

    Search for string insert an incremental count

    Regarding comments. I knew that one. :) />>Client/ { # Is this always the format to use /pattern/ with { on the same line and no / on this line either? "</Record>" # Why no / on this line? 1 # Ah....ok.
  3. NoobProgrammer

    write to log files

    Don't forget >> appends to an existing file. Use > to create a new file or overwrite and existing file.
  4. NoobProgrammer

    Search for string insert an incremental count

    Thanks much feherke. Sorry to took so long. Was tek-tips down earlier? I couldn't get in... Anyway, this is sweet. If you don't mind can you go over what the command is doing? awk '/>>Client/{print "<Record>"++i"</Record>"}1' /input/file > /output/file awk is searking for >>Client. in the...
  5. NoobProgrammer

    Search for string insert an incremental count

    I have a text file that I'm looking for all occurrences of >>Client. I want to then insert a line above it with <Record>1</Record>. The next occurrence would have <Record>2</Record> and so on. I’m not sure if sed would be more appropriate, but I’m not how to do it in either program regardless...

Part and Inventory Search

Back
Top