Search Results

Search: Posts Made By: dwdnet
9,630
Posted By dwdnet
Thanks Don, definitely does help. I'll have to...
Thanks Don, definitely does help. I'll have to take some time to digest this.
9,630
Posted By dwdnet
Hi Don, I'm trying to figure out how your code...
Hi Don,
I'm trying to figure out how your code works. If you wouldn't mind could you explain it for me please? I'd like to learn how it worked. Thanks.
9,630
Posted By dwdnet
Thanks everyone, Don's code above did the trick....
Thanks everyone, Don's code above did the trick. I really appreciate it, this will help immensely and save me an enormous amount of time.
9,630
Posted By dwdnet
Thanks for making me go back to the original...
Thanks for making me go back to the original sample, I looked at a few of the more complex database statements and there were blank lines in some of the statement text= fields. Here's an example of...
9,630
Posted By dwdnet
Manually editing would be very time consuming so...
Manually editing would be very time consuming so I'll attempt to explain using the example below. Running your initial function helped quite a bit and re-formated the majority of records. There were...
9,630
Posted By dwdnet
Some of the records are longer than 4K. There are...
Some of the records are longer than 4K. There are no blank lines in the long record however there are some line feeds, which is what is breaking the record into different lines. I am able to manually...
9,630
Posted By dwdnet
I'll have to create a mock up of a sample of the...
I'll have to create a mock up of a sample of the records as I can't put up live data. Hopefully that will suffice. Thanks.

---------- Post updated at 01:58 PM ---------- Previous update was at...
9,630
Posted By dwdnet
:) Don, that definitely worked for all but a...
:) Don, that definitely worked for all but a small portion of the log. That really helps. In a copy of the actual log, I ran the code you gave me and it did merge most lines.

I ran the od -bc...
9,630
Posted By dwdnet
Thanks RudiC. We are getting closer thanks to you...
Thanks RudiC. We are getting closer thanks to you all. The last command put everything on one line. The events should all begin with the timestamp field. So by using the example I provided there...
9,630
Posted By dwdnet
Thanks Don. I used the command line below. Right...
Thanks Don. I used the command line below. Right behind each semi-colon is a \r following by what looks like a space.

awk 'sub (/;$/, "")+1 && $1=$1' RS= infile
0000000 357 273 277 164 151 155...
9,630
Posted By dwdnet
Thanks for the quick response guys. I'm not...
Thanks for the quick response guys. I'm not seeing the same results as you are. The only line that I am seeing is the very last 'statement text' line.

statement text=SELECT table.field,...
9,630
Posted By dwdnet
Merge multiple lines into a single line
Hi all, I'm relatively new to scripting, I can do pretty basic things. I have a daily log file that looks like:


timestamp=2017-06-28-01.01.35.080576;
event status=0;
userid=user1;
...
Showing results 1 to 12 of 12

 
All times are GMT -4. The time now is 08:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy