General :: Script To Read File And Parse Log Message
Apr 5, 2010
I am working on the script to parsing the specific message like "aaaa" in multiple log files like N1-***,N2-***,N3-***..The script is to find the list of lof files which contains the message "aaaa" and export the list into excel filE.
View 4 Replies
ADVERTISEMENT
Jul 26, 2010
I need to read a file and parse a string. I know in Perl there is the split command. Is there something similar to that in C++?
View 6 Replies
View Related
Aug 21, 2010
I am trying to make a perl script which reads data from a file and parse it. The data in the file has the following syntax
Code:
Device Physical Name : Not Visible
Device Symmetrix Name : 1234
Device Serial ID : N/A
Attached BCV Device : N/A
Device Capacity
[Code]...
Each unique record starts with "Device Physical Name". So, I have a set of records within "Device Physical Name". I want to read this set of records starting from "Device Physical Name" and ends up till next "Device Physical Name". Offcourse FS is ":", and I just want to print/or later put info in a csv file.
View 14 Replies
View Related
Aug 30, 2010
I need to parse the file of same name which exist on different servers and calculate the count of string existed in both files.Say a file abc.log exist on 2 servers.I want to search for string "test" on both files and calculate the total count of search string's existence.For example if file abc.log on server 1 has string "test" 2 times
and file abc.log on server 2 has string "test" 4 times.then the output will beStringName : Countexampletest : 6 timesNote : I have created the password less connectivity using ssh-keygen.
View 2 Replies
View Related
Feb 4, 2010
What are the possible problem when Windows access the file from Ubuntu got Read Only even though have a full permission to read, write and execute the file? Ubuntu to Ubuntu accessing the file there is no problem only Windows got a problem.
View 1 Replies
View Related
Apr 26, 2011
I need to parse through a file which contains timestamps of transactions. What I am trying to do is come up with a Max Transactions Per Second (TPS) value. I was thinking that creating an array variable would be the way to go, but I'm having problems determining even how to start.
View 4 Replies
View Related
Apr 29, 2011
Go to a specified directory and open a log file and parse out specific information and dump it into another text file.
View 4 Replies
View Related
Apr 27, 2011
I want to write a bash script to parse a text file with the following lines and set variables for each line so that I can use them in the rest of the script.
Timestamp=123456789
Company=ABC Company
Server=Server
Recipient=Joe Smith
Email=joe@abc.com
simplest way to read each line one at a time for everything before the =, set that to a variable name with the value equal to everything after the =
View 14 Replies
View Related
Dec 10, 2010
I have the following code:
Code:
#include <stdio.h>
#include <stdlib.h>
int main() {
system("ps -ef | grep myprocessname");
return 0; }
When I run this program it outputs the following list of running processes:
Code:
root 10279 10275 0 13:02 ? 00:00:00 myprocessname myvar1=value1 myvar2=value2
root 10341 10337 1 13:02 ? 00:00:00 myprocessname myvar1=value1 myvar2=value2
What I want to really do is instead of writing the output to screen I want to read the output and parse the various values value1, value2 etc. What is the best way to do this?
View 4 Replies
View Related
Sep 28, 2011
I am trying to parse a line from a file and place the values into separate variables:
input.txt:
Code:
CreateVegaFeed-20110928-before-skip-start
this is the code i have done so far:
Code:
$input_file="input.txt"
INPUT_FILE=`cat $input_file`
for i in $INPUT_FILE
[Code].....
View 14 Replies
View Related
Dec 23, 2010
I have a log file that contains information like this:
----------------------------
r11141 | prasath-palani | 2010-12-23 16:21:24 +0530 (Thu, 23 Dec 2010) | 1 line
Changed paths:
M /projects/
M /projects/
[code]....
what i need is, i need to copy the data given between the "---" to seperate files, for, e.g. the first set of data between the "---" should be in one file and another set of data in another file.
View 5 Replies
View Related
May 3, 2010
When i logged into a gnome desktop i got this message: "The GNOME session manager was unable to read file:'/home/(desktop name)/ICEauthority'. If this file exists it must be readable by you for GNOME to work properly. try logging in with failsafe session and removing the file." What commands do i use for that? or do i need to do something else?
View 2 Replies
View Related
May 9, 2011
Always when i attempt to download any software, an error message opens stating that adobe 8 cannot read it. when saved in downloads clicking open does not function and i cant find an uninstall for the adobe reader 8. I cannot get any anit-virus protection, problem compounded by having no cd input.
View 3 Replies
View Related
Aug 2, 2010
I've written a script to parse a file and print each line that ends with matching pattern, if the next line is blank. The pattern lines are the result of md5sum $i|sed 's/path///g' so that only md5 and filename appear. Here's what I'm using.
Quote:
for fline in `sed -n '/.*.ext$/p' file1`
do
if [ "`sed -n -e '/'"$fline"'/ {n; p;}' file1`" == "" ]
then
echo ""$fline" has no info" >>file2
fi
done
[Code]....
View 4 Replies
View Related
Dec 9, 2008
How can I read .gz file direct on shell/terminal without decompressing the file?
satimis
View 5 Replies
View Related
Nov 17, 2010
I have to parse a file containing billions of records and populate them in the Data structure. I have used a lot of C++ class and creating objects of the class I am storing the information retrieved by parsing the file.
Now as the file become huge and number of objects become very large my code is getting bad_alloc error as it is not finding any space avalable in the heap for allocating new object.
Is there any way to parse the file?
View 7 Replies
View Related
Nov 27, 2010
I'm currently curios with my python program which the basic goal is to parse the character in mytestfile;let's see the code
Code:
f=open('/home/andrewraharjo/Desktop/snort.log','r')
j=f.read()
[code]...
View 3 Replies
View Related
May 23, 2011
i'm new to linux and i am running ubuntu 11.04.i'm trying to install wine. i downloaded the binary files and extracted them. i tried running the command './configure' and got a error saying :no such file or dir. i read the 'readme' file but cannot configure.
View 3 Replies
View Related
Apr 5, 2010
When I try to save my X configuration file.. it says "Failed to parse existing X config file '/etc/X11/xorg.conf'!"
I've already deleted my current xorg.conf and created a new one using sudo nvidia-xconfig and run NVIDIA X server settings using gksudo nvidia-settings but still can't save..I am using 32-bit Ubuntu 9.10 and my video card is NVIDIA FX 5500..
View 9 Replies
View Related
May 22, 2010
I successfully installed ubuntu but I cant install its updates, heres the prob:
dpkg: parse error, in file '/var/lib/dpkg/available' near line 19410 package 'initscripts': missing version
View 2 Replies
View Related
Nov 4, 2010
I don't think this is a "perl one-liner" of find and replace. I'm trying to auto-fill some information in a listing of files. The simplest example is that in the files the following exists:
I would want the script to find this and populate it with something like -- Date : 20101004-1758
I have a few more similar fields to autofill, and I'd like to do this from within a larger perl script I'm developing to process these files. So, how I perform in-place file modification from within a perl script?
View 3 Replies
View Related
Feb 24, 2010
When I parse a XML file, should I rely on the order of elements?
For example say we have:
Should I rely on the above order?
Would the following still be valid:
I'm trying to find out if a well formed XML document should have an ordered structure, or if it's still valid XML if it has no order.
View 7 Replies
View Related
Feb 5, 2010
since i reformatted my new hard drive i have been having issues saving my config file when i tried to save to x configuration file it says: Failed to parse existing X config file '/etc/X11/xorg.conf'.i used to be able to open the file as root and copy over the old x config with the new one but it wont let me even preview the changes until i click save to x configuration file. anyone know how i can fix this error? i tried uninstalling and that didn't help.
View 2 Replies
View Related
Jul 13, 2010
I am trying to think of a logic where my file contains some data I had to read and do some processing. Issue is that file contains data multiple times. For example:
:::::::::::
var1=value1
var2=value2
[code].....
I have to read first paragraph of variables and do some processing and then move on until the end of file. Variable names are same in whole file but for each paragraph the value is different. I can't think of a logic to attain this task. How can I do it? It should be a simple bash script, but I am not able to work out.
View 2 Replies
View Related
Mar 11, 2010
I have installed ClamAV 0.95.3 into Ubuntu 9.10 (i386) fully patched
I am behind an authenticating proxy, so I've entered these details into freshclam.conf:
HTTPProxyServer myproxy.com
HTTPProxyPort 1234
HTTPProxyUsername myusername
HTTPProxyPassword mypass
code....
So I changed the perms to 0700 (user is clamav).
Now I get:
$ sudo freshclam
ERROR: Can't open/parse the config file /etc/clamav/freshclam.conf
I checked DNS resolution with this (which I found in a thread somewhere):
# host database.clamav.net
database.clamav.net is an alias for db.local.clamav.net.
db.local.clamav.net is an alias for db.other.clamav.net.
db.other.clamav.net has address 193.1.193.64
db.other.clamav.net has address 130.59.10.36
- I presume the installation can find the update site?
View 3 Replies
View Related
Mar 31, 2010
I'm running ubuntu 9.04 and was happy because I finally got the screen resolution to be a good size, but now I can't update anything or even upgrade ubuntu.The message I get is
Quote:
Could Not Initialize Package Information
An unresolvable problem occured while initializing the package information.Please report this bug against the 'update-manager' package and include the following error message:
'E:Unable to parse package file /var/lib/dpkg/status (1), E:The package lists or status file could not be parsed or opened.'
I've also had issues with installing new programs (specifically tried Boxee (64bit ver) and Last.fm Scrobbler), but was thinking these issues might be related to the updage-manager error.
View 4 Replies
View Related
Jan 13, 2011
iḿ trying to parse a file using html parser by libxml.
Code: #include <stdio.h>
#include <libxml/HTMLparser.h>
#include <string.h>
void main(){
printf("main
");
[Code]....
View 4 Replies
View Related
Aug 8, 2010
when i try to use apt an error occurs: dpkg: parse error, in file '/var/lib/dpkg/status' near line 27317 package 'virtualbox-3.0': error in Version string `3.0.4-50677_Debian_lenny': invalid character in revision number E: Sub-process /usr/bin/dpkg returned an error code (2)
i tried to :
1- replace the file status with status-old
2- replace it with all the backups located in /var/backups/
and the same error occurs
View 4 Replies
View Related
May 26, 2011
There is a notifications-daemon, which shows sometimes infos like "5 updates, 5 security issues". It is represented by "i" in the system tray bar.Unfortunately, I cannot read the whole text of the messages there. I tried to click on it, right click, drag and what ever...Right now I have a line there "In order to complete this upgrade,...". And I cannot read it completely. How do I work with these notifications? Btw, KDE is running.
View 4 Replies
View Related
Jun 9, 2011
I installed fresh installation of F15 and I've allways used Evolution as my mailclient. There was in older Evolution versions option "Mark message as read in X secs" I set that to zero to read emails smoothly, now I have to wait after every message that it's got "as read" and that's really annoying especially if it's automatically sent message from server that I don't really have to "check" it just click it to get it as read. I've been gone thru all the settings of current Evolution in F15 and haven't found anymore that option. Maybe there's conf file somewhere that I can put that? That "Help" page for Evolution is kinda outdated.
View 3 Replies
View Related