hi
someone pl help me.
I have a log file SERVER_ERROR.log which contain 100000 or more lines
i need a script that should read a file named SERVER_LIST.txt
which contain 2 columns of data ie.......
1 2
XX BACKUP
BX STORAGE
JX DATA
RE CARD
FD CUSTOMER
HH SERVER
....and so (around 100 servers)
the script should search the SERVER_ERROR.log file for occurrences of each server ID (column 1) and write it to a text file named
SORTED_ERROR_LOG.txt
ie....
XX BACKUP = 200
BX STORAGE = 12
JX DATA = 123
RE CARD = 220
..... and so on
please help me
thanx in advance
searching log files
Moderator: DosItHelp
Re: searching log files
What is the 200 for? The number lines found in the log file that begin with XX BACKUP?
What does "columns" mean? Are XX and BACKUP separated by a various number of spaces or always by the same number?
Steffen
-
- Posts: 17
- Joined: 12 Feb 2017 05:11
Re: searching log files
hi
1.the 2 columns are seperated by a single tab space
2. the number 200 is possible number of lines in the SERVER_ERROR.LOG file.
3. only the "ID" ie....(XX BX JX RE) is written in the SERVER_ERROR.log and not the server name
1.the 2 columns are seperated by a single tab space
2. the number 200 is possible number of lines in the SERVER_ERROR.LOG file.
3. only the "ID" ie....(XX BX JX RE) is written in the SERVER_ERROR.log and not the server name