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