General :: The Script To Parsing The Log Message?

Apr 6, 2010

I am working on the script to parsing the log message . the followings are my task:1. Read the multiple log files, such as N1-2009-10-01, N2-2009-10-2, N3-2010-01-02....2. Parse the specific message, such as "aaaa"3. If found the "aaaa" message in the log file and export to excel file PS. i use zgrep:zgrep -a --text "aaaa" * > /home/TTS/myfileand inside file looks like:

N3.2009-11-26-03-05-02.console.log.tar.gz:2009-11-25 20:12:57,429 - aaaa
N4.2009-11-29-00-25-03.console.log.tar.gz:2009-11-28 10:42:18,209 - aaaa
N6.2009-12-01-10-05-02.console.log.tar.gz:2009-12-01 10:00:24,902 - aaaa

[code]....

View 1 Replies


ADVERTISEMENT

General :: Firefox XMl Parsing Errors

Jun 30, 2011

I keep getting Firefox XMl Parsing Errors(64 bit firefox). It's driving me crazy. Even in safe mode this happens.

View 1 Replies View Related

General :: Parsing A File Into Database?

Jul 14, 2010

parsing the text file in perl.I have very large text file with plenty of columns and rows.how can i parse the file into Oracle database.

View 3 Replies View Related

General :: Parsing A Binary File?

Mar 17, 2011

Is it possible to parse through a binary file using a script using either Korn shell or Bash

View 3 Replies View Related

General :: Parsing Strings Containing Bash Scripts?

Jan 15, 2010

fakeFile's contents :

Code:

blah $(date +%F) blah

fakeScript's contents :

Code:

while read line; do
echo $line
done < "fakeFile"

so here's the problem : is there any way to evaluate the fakeFile's contents (in the fakeScript), so that the term "$(date +%F)" (or any other bash script) in a string , translates to it's corresponding value ? (in this example , we want to have "blah current date" instead of " blah $(bash script) blah " )

View 9 Replies View Related

General :: Parsing File With Multiple Delimiters?

Jun 21, 2011

I am using nessus to scan systems, and it generates the report file without any specific delimiter. Shown below is how a typical line in the file reads (It might show up as a very long line.

Code:

xx.xx.xx.xx|cpq-wbem (2301/tcp)|49272|REPORT|Synopsis :;;The remote web server is affected by multiple vulnerabilities.;;Description :;;According to its self-reported version number, the HP System;Management Homepage install on the remote host is earlier than 6.2. ;Such versions are reportedly affected by the following ;vulnerabilities :;; - Session renegotiations are not handled properly, which; could be exploited to insert

[code]....

The field of interest (for me) are IP ADDRESS, Synopsys, Description, Solution and Risk Factor. I tried the following command to parse this:

Code:

sed s/:;;/|/g report.nsr | grep Risk Factor |High | awk 'BEGIN {FS = "[:][;][;]"} {printf("%s|%s|%s|%s",$1, $6, $7, $10)}'

But this would not give desired results as ':;;' is not a standard delimiter and hence gives incorrect results. how to grab everything that occurs between the strings 'Synopsys', 'Description', 'Solution' & 'Risk factor' in the above example? In other words i may be asking to use multiple delimiters.. in the order of occurance.. is there a tool that supports multiple delimiters?

View 7 Replies View Related

General :: Parsing Output - End Of File Option ?

Feb 23, 2011

I'm working on a alias/script that will make it easier to look at my environment via the set command.

On my ubunto when running set it also displays some 10 pages of code pertaining to something called "imagemagik". at the end of the output. This code begins with the { character.

This is annoying if I want to look at my environment when working on scripts. How could I use something like grep, awk, sed, or whatever to ignore everything after the "{" character.

That seems to be the simplest way as long as there are no leading brackets in my environment. (And if you're thinking I should just remove {imagemagik}, I might just do that. But I still would like to know how to do this).

View 3 Replies View Related

General :: Capturing And Parsing Xterm Cut Buffer In EMacs

Jan 17, 2010

I'd like to make an indirect control for Emacs (in Ubuntu Linux) so that I can swipe some text in an xterm with the cursor, cutting it into the X cut buffer, then run a macro in Emacs to parse the cut buffer text to look for text saying "line XXXX" where X is all digits, then go to that line in the current Emacs buffer. I think this is possible by using emacsclient to get emacs to run a macro, then the macro parsing the cut buffer, then issuing a goto-line command to the number that's been parsed. My problem is I don't know how to write the emacs script to read the X cut buffer and parse it.. I've been going through cookbook examples but none seem to fit.

My goal is to ease development. When I have an error/information/status message printed in an xterm, I want to swipe the error message which says something like "syntax error on line 2776" then press a keyboard shortcut which Ubuntu will interpret to launch emacsclient, which causes my already-open Emacs to grab that text, parse it, and go to the line number I just swiped. Only this last step of parsing is the hard part. (Yes, I know you can run a shell INSIDE of emacs, but this is doesn't fit my workflow). How would I make emacs look at that X cut buffer and parse out the line number and issue the "goto-line" command to the current buffer?

View 2 Replies View Related

General :: Parsing Delimited File And Variable Scripting?

Sep 23, 2010

I did some searches and after a few hours was able to get what I needed. What I didn't find was a fully encompased means of what I'm used to in the windows world in working with delimted files. Hopefully this is helpful to others and if there is something better or leaner way, even better.We have an issue where managing printers, just viewing on RHEL w/ sys-conf-prtr we lose any number of, up to ~30 printers from lpadmin. Rather than stare and compare to find the missing ones, I wanted to make an intuitive script. This is what I came up with.

Code:
#!/bin/sh
while IFS="," read Prntr IP; do

[code]...

View 3 Replies View Related

General :: Parsing Columns In Bash / Extract The First Set Of Numbers And Get Them To Appear Only Once?

Sep 28, 2009

as a result of a find command, i have

852065 72: /bin/gunzip
852065 72: /bin/gzip
852065 72: /bin/zcat

(the first column is inode number and the second is size if you're curious)

I want to be able to format it in a way such that:
852065 72:
/bin/gunzip
/bin/gzip
/bin/zcat

I know I can get the bottom half using awk- but I can't figure out how to extract the first set of numbers and get them to appear only once

View 9 Replies View Related

General :: Parsing Through A Nagios Config File To Extract Info W/ Sed - Awk - Vi

Oct 13, 2010

I have a config file called hosts.cfg.

It contains entries like this:

Quote:

There are many more of these entries in the file, over 500, all in this same format: each host has a "define host" followed by 18 directives contained in squiggly brackets.

If I want to know all the hosts that are in the hostgroup called SERVER_GRP, I suppose I would need to read every hostgroups line (8th directive in squiggly brackets) that contains SERVER_GRP and output the corresponding host_name line (1st directive in squiggly brackets) from that entry.

View 3 Replies View Related

General :: Bash And Php Parsing / Not Getting The Data To Output Correctly Into The Rows?

Oct 26, 2010

i am trying to get a script that i'm calling to have information from a sql populate into rows... but i'm not getting the data to output correctly into the rows. can someone please help?

<table>
<thead>
<tr>
<th>Name</th>
<th>Help</th>
<th>Folder</th>
code....

View 14 Replies View Related

General :: KMail's Message List - Change Message List Display?

Jul 20, 2009

KMail 1.11.4, KDE 4.2.4: I'm migrating from WinXP to Mandriva, and installed KMail at the weekend. Works fine, but I have a niggle - the message list displays headers grouped by month order. I'd like the option of having a simple list (no groups), and suspect that it could be done - but I haven't been able to find out how. I've checked in the Handbook without success, and a search in LQ hasn't turned up anything yet.Any suggestions gratefully received. If this isn't the right place for a KMail query,

View 1 Replies View Related

General :: Parsing File Dates - Get The Date Of The Last Time A File Was Modified ?

Jan 11, 2010

I need to get the modified date on a file in linux to use in a script.I tried using 'ls -l' on the file, but this caused problems when the date turned from a single digit into a double. The reason for the problem was because I was parsing the result string on spaces.How can I get the date of the last time a file was modified so I can use it in a script? For example, if a file was modified on 1/11/2010, I need the 11.

View 2 Replies View Related

General :: Parsing Err Or Invalid $END - Correct User Use Of Invalid Characters

Feb 10, 2011

Trying simply to insert into table. Have succeeded in doing this but now want to correct user use of invalid characters. If I'm understanding correctly, Real-escape-string seems to correct these, so I've been trying to figure out how to use it. A short, test code version gives me a syntax error at INSERT VALUES, which--because it still has the single quotes in the text--tells me the real-escape-string didn't work. The code below gives me a parseing error with invalid $END at </body>.

Insert Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' VALUES (UTC_TIMESTAMP,'What's happen' bra?')' at line 1 Parse error: syntax error, unexpected $end in /home/powere15/public_html/DB/exercises_insert_record.php on line 94
<html><head><title>Exercise Catalog Insert Record</title></head>
<body>
<?
/* Change db and connect values if using online */
[Code]....

View 2 Replies View Related

General :: Parsing Text And Combining The Parsed Text?

Oct 28, 2010

EDIT1: I should note that I was trying to do this in PERL, not sure if other alternatives are more simple?EDIT2: I should note that for text file 3 (reference), it's a long list of MANY cnp_id values and their corresponoding chr, start, and end values. So, the code will have to take the cnp_id from text file 1 and/or 2 and search through textfile 3 (reference) to match on the cnp_id and then take the corresponding chr, start, and end values and add to the relevant line in the output.EDIT3: Sorry, I should mention that the text file entries are all tab-delimited.I have 3 text files:File 1:Columns represent sample IDs (sample_id) and rows represent CNP IDs (cnp_id). Cells represents the confidence level (confidence) for each sample and CNP.Quote:

cnp_idP5E6_SNP6.0_JHP5_010408.CELP5E11reh_SNP6.0_JHP5_011808.CELP7C7_SNP6.0_JHP7_021208.CEL ... etc.
CNP100.0044798340.0027929510.00305613

[code]...

View 6 Replies View Related

General :: Xml Parsing Using "libxml2.so" Library

Mar 8, 2011

i need a sample xml parser program which parses given xml file and prints its contents iam very new to this area and iam using libxml2.so library I wish that provided example should be in C only

View 3 Replies View Related

Fedora Security :: Send An Email Using Evolution The Message Was Not Sent But Returns A Error Message?

Apr 30, 2009

Hi I am running a fedora 10 desktop. when i send an email using evolution the message was not sent but returns a error message:"Error while performing operation.DATA command failedError: 550 Viagra SPAM - Hi in Subject" and the message did not have an attachment just plain words. what might have gone wrong for i have been using this for sometime without a problem. or what security measures should be in place to remove this viagra spamAm I infected by virus on this fedora, all my updates are up to date.

View 1 Replies View Related

OpenSUSE :: Click On Install Get The Following Error>>Message Did Not Receive A Reply (timeout By Message Bus)?

Nov 10, 2010

Im trying to instal Sun Virtualbox but when download completes and I click on install I get the following error>>Message did not receive a reply (timeout by message bus) I wont even bother with this software if there are others out there that are as easy to use. I used it on Windows and thought it was great ! (thats how I eventually switched to Linux, by using it virtually at first)

View 5 Replies View Related

Programming :: Parsing Log File With Awk?

Aug 31, 2009

I have logs files from freeradius that have looks as follows:

$ grep "Login incorrect (rlm_ldap: User not found" /var/log/radius/radiusd-inner-tunnel-20090831.log
Mon Aug 31 09:25:27 2009 : Auth: Login incorrect (rlm_ldap: User not found): [John Doe] (from client oficina port 0 via TLS tunnel)

[code]....

I use the following line to get the amount of users that don't exist on ldap:

Code:

grep "Login incorrect (rlm_ldap: User not found" /var/log/radius/radiusd-inner-tunnel-20090831.log | awk '{print $14}' | sort -fu | wc -l

Now, awk on line one for example parses [John Doe] and [Joon Williams] as "[John" and that it's not what I'd want. I mean how could I do for awk looks username field as closed between squared brackets?

View 1 Replies View Related

Red Hat :: Awk Function For Parsing Files?

Nov 8, 2010

I am trying to parse this file and wld appreciate some assistance:

FILENAME=XUXESS.TXT
RECORD=44
S_KEY=

[code]...

View 4 Replies View Related

Ubuntu :: Error Message: Unable To Retrieve Message

Dec 31, 2010

Using IMAP to retrieve emails in Evolution is not working correctly. Some messages are recieved, others are not. Those messages that cannot be recieved, reports the following error message: Unable to retrieve message

Running the following;

evolution 2.28.3-0ubuntu10
Ubuntu 10.04.1 LTS
2.6.32-26-generic

View 4 Replies View Related

Ubuntu Servers :: Apache2: Php Not Parsing

Oct 18, 2010

I've reinstalled my system and installed apache. I've installed php5. 'a2enmod php5' returns with a message telling me that php5 is already enabled.

However, this code does not parse:

Code:
</php
phpinfo() ;
/>

I get a blank page. When I view the source code for the page, I see the php code.

How do I get php to work?

View 3 Replies View Related

Networking :: Code For At Commands Parsing In C?

Feb 1, 2010

I want to parse the AT commands using C programmemy problem is to send message using At commands in minicom from one system to other system using socket programmingif i will send here AT on other system it should respond as OK,and if we will send AT+CMGS="ip address" "message", on other system this message has to display can any one please tell me the code in C language

View 1 Replies View Related

Server :: Apache Not Parsing PHP On Ubuntu 8.04?

Sep 2, 2010

I have a new setup of 8.04 with Apache2, MSQL5 and PHP5.However, I can't get the PHP to run. It is NOT the common problem of the browser offering to download the files. In my case I have some PHP in an HTML file, but the PHP is just ignored.

I have played around with my httpd.conf and also php5.conf files, but I couldn't make any difference.

My httpd.conf sets the document root to /var/www and if I put a php file in here with command phpinfo(), then it seems to dispay correctly. My HTML files are /var/www/app/index.html

View 2 Replies View Related

Software :: AT Commands Parsing Code?

Feb 1, 2010

I want to parse the AT commands using C programmemy problem is to send message using At commands in minicom from one system to other system using socket programmingif i will send here AT on other system it should respond as OK,and if we will send AT+CMGS="ip address" "message", on other system this message has to displaycan any one please tell me the code in C language

View 3 Replies View Related

Programming :: Get Group Name From GID Without Parsing /etc/groups?

Sep 14, 2010

Is there a Linux system call that can be used to get the group name from the GID returned by stat()? I realize that I could parse /etc/groups (if my user had sufficient permissions).

View 3 Replies View Related

Programming :: Parsing S-Expressions In Python?

Feb 1, 2011

I've been loosely following this:http://norvig.com/lispy.htmlAnd I have a problem: the parsing function throws an array out of bounds exception. I thought that maybe I'm doing it wrong, so I copy and pasted the code from the page, and still the same error

View 2 Replies View Related

Programming :: Parsing Xml File From A C Program?

Mar 14, 2009

i wanted to know how can I pars a xml file (read data from xml file) and from C program.is there any function to do this for me in C.

View 1 Replies View Related

Programming :: Parsing XML Using Sax Parser In Java

Jul 7, 2011

I'll show the code first:

Code:

What I am after is to get the string text from the clip tags. But for now I just tested to see if it can finds the command tags and print something if it does. But it doesn't find it. Anyone knows why ?

Looks like the xml is not good, i test it with a xml validator:

Code:

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved