Search Results

Search: Posts Made By: sjug
9,717
Posted By sjug
Once again, I apologize for my poor specificity. ...
Once again, I apologize for my poor specificity.

Each time the log is parsed, the existing xml files are overwritten.

I would prefer that as soon as the filename is determined while reading...
9,717
Posted By sjug
ghostdog, this comparison to not overwrite...
ghostdog, this comparison to not overwrite existing files is not working
my current whole script looks like:

/HandleRequest.*AService/{
if(b=match($0,"xml")) {
xml=substr($0,b-2)
...
9,717
Posted By sjug
I think a predefined directory would be simpler...
I think a predefined directory would be simpler in the long run, what would the comparison be for array[2] being null?
9,717
Posted By sjug
running AIX 5.3, bash, and I don't know what...
running
AIX 5.3, bash,
and I don't know what version of awk (there is no version flag?)

I fixed the original error I posted above, as my version of awk seems to have a problem with spaces in...
9,717
Posted By sjug
Thanks alot for all your help ghostdog! :) ...
Thanks alot for all your help ghostdog! :)

My combined script looks like:

#!/usr/bin/awk -f
# Awk script: extract3.awk

/HandleRequest.*OrderControlService/{
if ( b= match($0,"xml")...
9,717
Posted By sjug
Sorry, it seemed clearer to me. Since...
Sorry, it seemed clearer to me.


Since this script will be run frequently on the same log file(s), I would like to:

-Add a check to make sure the script does not overwrite existing xml files...
9,717
Posted By sjug
Thanks for all of your help ghostdog,...
Thanks for all of your help ghostdog, Jean-Pierre, and matrixmadhan!

ghostdog: I have adjusted your second edit, and made it into a script, and it works with fantastic results on my very large log...
9,717
Posted By sjug
Thanks ghostdog, It is interesting to see...
Thanks ghostdog,

It is interesting to see the different methods everyone has to tackle the same parse.

Ghostdog: I tried to add a bit to the if statement to only output lines that had...
9,717
Posted By sjug
Continued thanks for all your support...
Continued thanks for all your support Jean-Pierre,

but I still get no output at all from the latest input file (as pasted by yourself), and the latest extract script
9,717
Posted By sjug
Thanks for your response Jean-Pierre, The...
Thanks for your response Jean-Pierre,

The script does work with my sample file but not every line has the same format. For example these lines are thrown in between the previous ones I posted.
...
9,717
Posted By sjug
Thanks for the amazingly quick response. As...
Thanks for the amazingly quick response.

As you said, untested, but so far good start.
Two main issues
First, it doesn't quite work. I neglected to mention that I only want to get what is after...
9,717
Posted By sjug
More complicated log parsing
Hey Guys,

I am trying to grep within a file to find and output certain parts of lines to other file(s). The output files need to have a dynamic file name based on a field in the main log.

The...
Showing results 1 to 12 of 12

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