Help need to write a script on column separation for syslog output in perl
HI Pros,
I have a issue.I need to write a script to parse the logs got from syslog server and update the same in my database.I need the following output.I donot know perl and I heard it very easy to write in perl
I have the sample log I need each column seperated by commas and all equals need to be removed ie date= time= needs to be removed
THis is the same log
I need the following output
This output will be very easy when I update in database
Last edited by pludi; 10-26-2009 at 01:38 PM..
Reason: code tags, please
Hello friends,
I am having a awk script which does my goal , but I want to learn perl , after learning the basics in perl now I am trying to convert my nawk script to perl .
Please help me to do some task in perl that I ve already did in nawk.
Like I am facing some problem in... (10 Replies)
i am trying to write a script to parse some tcpdump output, in each line of the tcpdump output, I know for sure there are 3 keywords exist:
User{different usernamehere}
NAS_ipaddr{different ip here}
Calling_station{ip or dns name here}
But the positions for these 3 keywords in the... (4 Replies)
Hi,
Can anyone please help me with this issue.
I have a Awk command which take file as input, and provides the output having multiple lines, its working in command mode, but not if i plug it in script.
#!/bin/ksh
infile=a.txt
outfile=b.txt
awk '
BEGIN{
FS=OFS="|";ORS = "\n";... (1 Reply)
All,
Can anyone please help me with the below scenario in korn shell script.
Can anyone please give me some hints to proceed on this.
I have a Flat file of the below format.
Input file format:... (1 Reply)
Hey everyone!
I have a tab delimited data set which I want to create an output contained the calculation of number of those lines with a certain value in 2nd and 3rd column.
my input file is like this:
ID1 1 10M AAATTTCCGG
ID2 5 4M ACGT
ID3 5 8M ACCTTGGA
ID4 5 ... (7 Replies)
can any one suggest me on how to write a update query in perl script for Oracle database and also tell me abt how we can write a code for sending mails with report as attachment to appropriate persons? (1 Reply)
Hi,
I have on Designdocument in that information is stored with in tabular format.I need Perlscript to read and write the datausing perl script?
Regards,
Ravi (0 Replies)
Hi ,
I got the following script from internet to display queue depth using Perl Script. However, when I execute it , im getting following error. Can anyone shed light on what is going wrong?
#!/usr/bin/perl
## 07/23/01
## Depth Inquiry sample program.
## Arguments:
## Connects to... (11 Replies)
Hi there,
say I have a line with multiple columns but with different separation formats: spaces, tabs..
Is it possible to have AWK print the separation format between each column? (10 Replies)
hi,
Hope you are doing good.
During my coding yesterday i got this challenge, actually not a challenge it like to optimize the code.
I am printing some statement to monitor the file progress in the log file an also to display it in the screen. so i ended up in the below statements.
... (6 Replies)
Discussion started by: mad man
6 Replies
LEARN ABOUT DEBIAN
ares_expand_name
ARES_EXPAND_NAME(3) Library Functions Manual ARES_EXPAND_NAME(3)NAME
ares_expand_name - Expand a DNS-encoded domain name
SYNOPSIS
#include <ares.h>
int ares_expand_name(const unsigned char *encoded,
const unsigned char *abuf, int alen, char **s,
long *enclen)
DESCRIPTION
The ares_expand_name function converts a DNS-encoded domain name to a dot-separated C string. The argument encoded gives the beginning of
the encoded domain name, and the arguments abuf and alen give the containing message buffer (necessary for the processing of indirection
pointers within the encoded domain name). The result is placed in a NUL-terminated allocated buffer, a pointer to which is stored in the
variable pointed to by s. The length of the encoded name is stored in the variable pointed to by enclen so that the caller can advance
past the encoded domain name to read further data in the message.
RETURN VALUES
ares_expand_name can return any of the following values:
ARES_SUCCESS Expansion of the encoded name succeeded.
ARES_EBADNAME The encoded domain name was malformed and could not be expanded.
ARES_ENOMEM Memory was exhausted.
SEE ALSO ares_mkquery(3)AUTHOR
Greg Hudson, MIT Information Systems
Copyright 1998 by the Massachusetts Institute of Technology.
20 Nov 2009 ARES_EXPAND_NAME(3)