12-02-2011
below perl may give you some clue
while(<DATA>){
my $str = "eventType".$_;
if($str=~/^(?:eventType)+\s+([^,]+).*eventTime[^\d]+(\d+)/s){
print $1," ",$2,"\n";
}
}
__DATA__
your data here
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Please someone I need information on how to change a Unix form/document into a microsoft word document in order to be emailed to another company. Please help ASAP. Thankyou :confused: (8 Replies)
Discussion started by: Cheraunm
8 Replies
2. Shell Programming and Scripting
Data in File
ABC:DEFGHI:123
ABCZYE:DEFI:123
ABCFGD:DEF:123
ABCEERRRRR:DEFGHI:123
Expected Format
1 ABC DEFGHIFE 123
2 ABCZYE DEFI 123
3 ABCFGD DEF 123
4 ABCEERRRRR DEFGHI 123
However when i enter the following... (2 Replies)
Discussion started by: blurboy
2 Replies
3. UNIX for Advanced & Expert Users
I have one file say CM.txt which contains values like below.Its just a flat file
1000,A,X
1001,B,Y
1002,B,Z
...
..
total around 4 million lines of entries will be in that file.
Now i need to write another file CM1.txt which should have
1000,1
1001,2
1002,3
....
...
..
Here i... (6 Replies)
Discussion started by: sivasu.india
6 Replies
4. Shell Programming and Scripting
Hi,
i need to encrypt and decrypt of a string. pls provide me some syntax or any method available using shell script.
i know one method i.e.,
perl -e 'print pack "H*","message"'
so if perl command doesnt work then what is the other method to encrypt and decrypt.
Thanks in advance. (0 Replies)
Discussion started by: syamkp
0 Replies
5. Shell Programming and Scripting
Net::SSH::Perl ...... how to print the output in a proper format
my $cmd = "ls -l";
my $ssh = Net::SSH::Perl->new($host);
$ssh->login($user, $pass);
my($stdout, $stderr, $exit) = $ssh->cmd("$cmd");
print $stdout;
the script works fine, but i am unable to see the output... (2 Replies)
Discussion started by: gsprasanna
2 Replies
6. Shell Programming and Scripting
HI Guys,
I have data in File A.txt
RL03 RL03_A_1 RL03_B_1 RL03_C_1
RL03 -119.8 -119.5 -119.5
RL07 RL07_A_1 RL07_B_1 RL07_C_1
RL07 -119.3 -119.5 -119.5
RL15 RL15_A_1 RL15_C_1
RL15 -120.5 -119.4
RL16... (2 Replies)
Discussion started by: asavaliya
2 Replies
7. Shell Programming and Scripting
How to remove x lines form top and y lines form bottom.
This works, but like awk only cat file | head -n-y | awk 'NR>(x-1)'
so remove last 3 lines and 5 firstcat file | head -n-3 | awk 'NR>4' (5 Replies)
Discussion started by: Jotne
5 Replies
8. Shell Programming and Scripting
Hi All,
I have result log file which looks like this (below): from the content need to consolidate the result and put it in tabular form
1). Intercomponents Checking
Passed: All Server are passed.
======================================================================
2). OS version Checking... (9 Replies)
Discussion started by: Optimus81
9 Replies
9. Shell Programming and Scripting
hi,
I have a script which is dispaying the output as below:
Column 3:value1
Column 4:value 4
column 8:value 8
column 9:value 9
column 13:value 13
Column 3:value10
Column 4:value 40
column 8:value 80
column 9:value 90
column 13:value 103
However,I need the output in tabular... (5 Replies)
Discussion started by: Vivekit82
5 Replies
LEARN ABOUT NETBSD
dynamic_field_info
FORMS(3) BSD Library Functions Manual FORMS(3)
NAME
dynamic_field_info, field_info -- form library
LIBRARY
Curses Form Library (libform, -lform)
SYNOPSIS
#include <form.h>
int
dynamic_field_info(FIELD *field, int *drows, int *dcols, int *max);
int
field_info(FIELD *field, int *rows, int *cols, int *frow, int *fcol, int *nrow, int *nbuf);
DESCRIPTION
The function dynamic_field_info() returns the sizing information for the field given. The function will return the number of rows, columns
and the maximum growth of the field in the storage pointed to by the drows, dcols and max parameters respectively. Dynamic field information
cannot be requested for the default field. If the field given is not dynamic then dynamic_field_info() will simply return the size of the
actual field. The field_info() will return the number or rows, columns, field starting row, field starting column, number of off screen rows
and number of buffers in rows, cols, frow, fcol, nrow and nbuf respectively.
RETURN VALUES
The functions will return one of the following error values:
E_OK The function was successful.
E_BAD_ARGUMENT A bad argument was passed to the function.
SEE ALSO
curses(3), forms(3)
NOTES
The header <form.h> automatically includes both <curses.h> and <eti.h>.
BSD
January 1, 2001 BSD