I am on AIX (6.1). I can only use shell (ksh) script.
I can't do this on my own, so will do my best to explain my needs.I also do not know what is the best idea to make it work, so here is what I am thinking, but I may wrong.
I need help to extract info on a log. The info needed will only concern the day today. So the script must be able to know the date of the day TODAY, and extract the scpecific pattern
The idea is to create shell script that could run on crontab 3 times a day. The script must be able to extract specific pattern for today day. Means if today is 2011/11/09 it won't get the pattern of yesterday for exemple. If the pattern doesn't not exist for today, it will exit.
Here is the date return format on the AIX :
As you can see, here is the date pattern written on the log file :
I fact, I was looking for something like getting the date of the day,
then format the date to match the date used in the log file
then start to read the log file from the first line that match the date of the day.
and find if there is or not any pattern that will be :
.
If no math found the script will exit, if match found it will send me a mail.
Hello.
Here is a file contents :
declare -Ax NEW_FORCE_IGNORE_ARRAY=(="§" ="§" ="§" ="§" ="§" .................. ="§"Here is a pattern
=I want to extract 'NEW_FORCE_IGNORE_ARRAY' which is the whole word before the first occurrence of pattern '='
Is there a better solution than mine :... (3 Replies)
Hi
This is my first post and I'm just a beginner. So please be nice to me.
I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file?
I have tried sed -n 241,241p... (13 Replies)
Hi Gurus,
I'm using HP-UX B.11.23 operating system.
I've been trying to extract a specific wording for example: "A tool used by tp produced warnings" from my below log data, but could not find a way to solve it. My intention is, if the log contain the word: "A tool used by tp produced... (9 Replies)
Hi,
I need to extract <APPNUMBER> tag alone, if the <college> haas IIT Chennai value. college tag value will have spaces embedded. Those spaces should not be suppresses.
My Source file
<Record><sno>1</sno><empid>E0001</empid><name>Rejsh suderam</name><college>IIT ... (3 Replies)
Hi Friends,
I have a file with the following values..
xyz.txt,12345.xml
abc.txt,04567.xml
cde.txt,12134.xml
I would like to extract all the 2nd column values like
12345
04567
12134
Please advice!! (3 Replies)
Hi , I am having a script which will start a process and appends the process related logs to a log file. The log file writes logs with every line starting with date in the format of: date +"%Y %b %d %H:%M:%S".
So, in the script, before I start the process, I am storing the date as DATE=`date +"%Y... (5 Replies)
Hi All,
I am a newbie to Shell Scripting.
I have a File
The Server Name
XXX002
-------------------------
2.1 LAPD
Iface Id Link MTU Side
ecc_3_1 4 Up 512 User
ecc_3_2 5 Up 512 User
The Server Name
XXX003
-------------------------
2.1 LAPD (4 Replies)
Hello,
Below is my input file's content ( in HP-UX platform ):
ABCD120672-B21 1
ABCD142257-002 1
ABCD142257-003 1
ABCD142257-006 1
From the above, I just want to get the field of 13 characters that comes after 'ABCD' i.e '120672-B21'... . Could... (2 Replies)
hi,
how would i extract a range of lines in a file by using the line number? ex: file contains:
1 title
2 i want
3 this part
4 to be taken out
5 from this file
6 and sent to
7 another file
8 not needed
9 end of file
In this case, i want to copy line number 2 to 7 on a new... (2 Replies)