Search found 10 matches

by rcmpayne
19 Nov 2018 12:10
Forum: DOS Batch Forum
Topic: JREPL syntax failure
Replies: 0
Views: 18915

JREPL syntax failure

Hello All, trying to use this post https://www.dostips.com/forum/viewtopic.php?f=3&t=8115 to use a new syntax for a different set of log however I have something incorrect with the syntax and hoping someone can see what i have wrong. One part i don't understand is (?:\t| | call %Tools%\CombineServer...
by rcmpayne
13 Feb 2018 13:32
Forum: DOS Batch Forum
Topic: jrepl question on how to reverse a command
Replies: 0
Views: 14257

jrepl question on how to reverse a command

I am using the following to take all log lines that does not have a timestamp to the line above. This is working great, however, I was wondering if someone can advise how I could reverse this? The reason for doing this is to merge gigs of server logs and grep/sort them by timestamp and cut into smal...
by rcmpayne
10 Jan 2018 08:22
Forum: DOS Batch Forum
Topic: Looking to improve batch file to count and grep the data to separate files.
Replies: 4
Views: 4823

Re: Looking to improve batch file to count and grep the data to separate files.

Thanks, its available in GnuWin32 C:\Tools>split.exe --help Usage: split.exe [OPTION] [INPUT [PREFIX]] Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default size is 1000 lines, and default PREFIX is `x'. With no INPUT, or when INPUT is -, read standard input. Mandatory arguments to l...
by rcmpayne
09 Jan 2018 08:40
Forum: DOS Batch Forum
Topic: Looking to improve batch file to count and grep the data to separate files.
Replies: 4
Views: 4823

Re: Looking to improve batch file to count and grep the data to separate files.

AH, thanks for the help. The first part of the script is done and its dropped the time from 24 hours to ~13 mins. Starting to work on the second part now but let me know if you see any room for improvement? increasing sort above -S 1G does not seem to do anything even-though i have 8GB memory availa...
by rcmpayne
08 Jan 2018 10:43
Forum: DOS Batch Forum
Topic: Looking to improve batch file to count and grep the data to separate files.
Replies: 4
Views: 4823

Looking to improve batch file to count and grep the data to separate files.

Hello All, I have a batch file that does two things and it works but on a 9GB file, it takes forever. Does anyone have any ideas how i can improve this from a batch file? Currently using cut, grep, awk, sed from GNU. The %File_IN% is a 9GB server log where i want to end up with two new files. %Resul...
by rcmpayne
25 Sep 2017 09:56
Forum: DOS Batch Forum
Topic: Looking for some help greping a large logfile and split the logs in separate logs per hour
Replies: 2
Views: 3527

Re: Looking for some help greping a large logfile and split the logs in separate logs per hour

Trying something like this works but not very sufficient. any tips would be great set InputFile=ALL_UOS.txt set OutputFile=ALL_UOS.txt Cant get this to work rem set "CoreRegex=\r?\n(?!\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d\d\d-\d{4})" rem cat ALL_UOS_ACCS.txt | grep \d{4}-\d\d-\d\dT05:\d\d:\d\...
by rcmpayne
22 Sep 2017 10:05
Forum: DOS Batch Forum
Topic: Looking for some help greping a large logfile and split the logs in separate logs per hour
Replies: 2
Views: 3527

Looking for some help greping a large logfile and split the logs in separate logs per hour

Looking to use JREPL to grep a very large file (5-15GB or more) file and split the file to per hour. the example below would be the start of every logline. 2017-04-24T01:26:58.728-0400 - 2017-04-24T03:26:58.728-0400 - 2017-04-24T03:26:58.728-0400 - 2017-04-24T04:26:58.728-0400 - 2017-04-24T04:26:58....
by rcmpayne
08 Sep 2017 11:58
Forum: DOS Batch Forum
Topic: JREPL command to move loglines that dont start with a date/timestamp to the line above that has a date/timestamp
Replies: 3
Views: 4577

Re: JREPL command to move loglines that dont start with a date/timestamp to the line above that has a date/timestamp

Just another question for you. Now that i have xx amounts of logs done with the above do you have any javascript or other technics to combine the logs, sort and split them again? 1. combine all logs to one file 2. sort file by timestamp 3. delete dup lines 4. split log by size 1. Any better ways to ...
by rcmpayne
08 Sep 2017 09:25
Forum: DOS Batch Forum
Topic: JREPL command to move loglines that dont start with a date/timestamp to the line above that has a date/timestamp
Replies: 3
Views: 4577

Re: JREPL command to move loglines that dont start with a date/timestamp to the line above that has a date/timestamp

Thanks, it seems to be working. can you explain the syntax here? trying to better understand how its doing what its doing
by rcmpayne
08 Sep 2017 07:15
Forum: DOS Batch Forum
Topic: JREPL command to move loglines that dont start with a date/timestamp to the line above that has a date/timestamp
Replies: 3
Views: 4577

JREPL command to move loglines that dont start with a date/timestamp to the line above that has a date/timestamp

Hello All, I found this form by looking for a better way to parse logs and someone advised to use JREPL7.0. The issue here is I am new and a bit confused to advance regex. What I need is a syntax to scan large log files and move log lines that don't have date/time at the beginning of the file to the...