Search Results

Search: Posts Made By: LDHB2012
3,605
Posted By LDHB2012
Thank you all for replying and I apologize for...
Thank you all for replying and I apologize for not making myself clear when asking this question. I think RudiC (https://www.unix.com/members/302122047.html) may have got it the closest, but I'm still...
3,605
Posted By LDHB2012
Sort uniq or awk
Hi again,

I have files with the following contents

datetime,ip1,port1,ip2,port2,number

How would I find out how many times ip1 field shows up a particular file? Then how would I find out how...
1,055
Posted By LDHB2012
Thank to the both of you. I will attempt to give...
Thank to the both of you. I will attempt to give it a shot. Likely I'll be back. :o

-David

---------- Post updated at 04:05 PM ---------- Previous update was at 03:10 PM ----------



...
1,055
Posted By LDHB2012
Using awk and output to files
I currently have this code:

awk ' BEGIN { FS = OFS = "|"} { l=length($1) $1 = sprintf("%s-%s-%s %s:%s:%s", substr($1, l - 13, 4), substr($1, l - 9, 2), substr($1, l - 7, 2), substr($1, l - 5, 2),...
6,118
Posted By LDHB2012
There most likely should be for loop. While I ask...
There most likely should be for loop. While I ask these questions and try to come up with solutions for easier processing on these logs, I'm taking small tutorials on the different commands (awk,...
6,118
Posted By LDHB2012
With this one, that I already mentioned had...
With this one, that I already mentioned had worked. Is there a reason why it would take a pretty large amount of time to complete the script, while creating just one file for one search string is...
6,118
Posted By LDHB2012
That seems to work like a charm. So if I...
That seems to work like a charm.

So if I wanted to create a separate file, that has the contents of EVERYTHING else (not included in the "infile"), how would that else statement look?
6,118
Posted By LDHB2012
Scrutinizer, This code was given to me in...
Scrutinizer,

This code was given to me in this thread. I'm now going through some modifications to make this logic work with other files. Would you be able to take me through the code, piece by...
2,306
Posted By LDHB2012
That's amazing. It worked the first time...
That's amazing.

It worked the first time around. I really appreciate your help on this.

If you could answer a qusetion... I'm having trouble finding a tutorial or information on the "l - 13"...
2,306
Posted By LDHB2012
Use of awk and printf - help needed
I have a very large file with more than 500,000 lines of dated events.

The first field contains the date/time in the following format:
20120727-files.files:20120727090044

where the first 8...
6,118
Posted By LDHB2012
That's awesome. I had some things on my end to...
That's awesome. I had some things on my end to fix. But finally got it working, thanks to y'all. I appreciate the help.

While it finally works, I'd still like to know what I'm typing, which most...
6,118
Posted By LDHB2012
Sorry to play message tag with you... I'm on a...
Sorry to play message tag with you... I'm on a MAC, obviously using OSX. I read that creating awk files would be best and using BEGIN and END seem to be pertinent. However, awk is very confusing to...
6,118
Posted By LDHB2012
Alright. I tried what you put here. I changed the...
Alright. I tried what you put here. I changed the .txt file to the actual file with the strings and changed the actual directory with the files to be searched.

Everything else I kept the same. It...
6,118
Posted By LDHB2012
bipinajith, Azrael: Thank you both for the...
bipinajith, Azrael:

Thank you both for the replies. I understand very well the examples you have both posted. If we can make things a little more complex, but at the same time simple in regards to...
6,118
Posted By LDHB2012
Bash Scipting (New); Run multiple greps > multiple files
Hi everyone,

I'm new to the forums, as you can probably tell... I'm also pretty new to scripting and writing any type of code.

I needed to know exactly how I can grep for multiple strings, in...
Showing results 1 to 15 of 15

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