I'm searched for one day your forum for a similar solution. Didn't find one, sorry
Now here is what I'm searching for. I have the following multiple lines from a log (Edit: log name is SystemOut.log - this is not my day. I Apologize):
I want to read the number 16811 and check if it is bigger then 40000. If so, close an special port on the server. Easy, that's the whole thing, don't expect getting it from you. I'm happy to get the number (will dance in the office). Edit: Trick is, the log is about 13Mb big and contains old log data. So it will shut down immediately if it find a old 40000. For this reason I choosed tail because it doesn't matter if we miss some large ms numbers. Sorry I don't mentioned this before.
Here is what I have so far:
This little Perl code (on AIX 6.2), marks "Excecution Time:16811" yellow and red. this work is done manually atm. So I think you get the plan. It has not to be perl, any other solution will be fine. It's just I'm a little rookie to Perl an a noob for anything else on AIX.
Thank you for some help or advice.
greets nobodyhere
Last edited by nobodyhere; 12-10-2010 at 05:08 AM..
Hi All,
Let us say we have 5 log files, extract the data from all log files and save the output in a file.
home/log/first.log
home/log/second.log
home/log/third.log
home/log/four.log
home/log/five.log
I want to extract the following text from the log files and save the output in a file.... (7 Replies)
Hi, all
I need your help and suggestions.
I want to print particular strings in a field of a csv file and show them in terminal. Here is an example of the csv file.
SourceFile,Airspeed,GPSLatitude,GPSLongitude,Temperature,Pressure,Altitude,Roll,Pitch,Yaw... (7 Replies)
consider below file contents
cat myOutputFIle.txt
8 CCM-HQE-ResourceHealthCheck:
Resource List :
No RED/UNKNOWN resource Health entries found
----------------------------------------------------------
9 CCM-TraderLogin-Status:
Number of logins: 0... (4 Replies)
Hi,
I have a script that runs to generate a log file which is in this format:
Start: Friday, April 29, 2011 18:30
User :
Host :
Database :
I need to write a script that reads this log file (RUN.LOG) and rename the existing log file... (7 Replies)
Hi All,
I've been searching through existing post and have been able to find most of what I want but am still stuck...
I'm trying to get part of the current file name as a string. The file name is in the form of:
basefilename_xxx(...).sh
I need the bit xxx(...) and it varies in length.
... (6 Replies)
What would be the most succinct way of doing this (preferably in 1 line, maybe 2):
searching the first 10 characters of every line in a text file for a specific string, and if it was found, print out characters 11-20 of the line on which the string was found.
In this case, it's known that there... (13 Replies)
I have a log file which contains data like this
This log file is updated twice a day at 7am and 6pm,
I want a script(which i will make run at 7:10am and 6:10pm) which should fetch only the last appended lines since last update..
I mean.. if i execute the script at 7.10am 3/3/2010
it... (4 Replies)
Hi
Let's say I have a log file with this format:
Marker1
End of Marker1
....
Marker1
End of Marker1
....
Marker1
End of Marker1
how to get the last part between End of Marker1 and Marker1? (1 Reply)
hi!
i have a file consisting of the following lines:
(BTW, = space)
.
.
.
12ME_T1mapping_flip30bshortf
13DCE_whole_brainbshortf
13DCE_3Dbshortf
.
.
.
the list of scans starts at 1 and goes on sometimes up to 60 scans. i would like to change only the lines that contain 'whole' to... (2 Replies)
Hi there,
I'm having some problem with UNIX scripting (ksh), perhaps somebody can help me out?
For example:
------------
Sample content of my log file (text file):
--------------------------------------
File1: ....
info_1 ...
info_2 ...
info_3 ...
File2: ....
info_1 ...
info_2 ...... (10 Replies)