12-03-2013
RS="-+" matches the strings of minuses that indeed separate the records. Should there be other minus signs in records, the RS would nee to be adapted.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi, everyone
The input file pattern is like below:
Begin Object1
txt1
end
;
Begin Object2
txt2
end
;
... (14 Replies)
Discussion started by: sophiadun
14 Replies
2. Shell Programming and Scripting
suppose if u have a file like that
Hen ABCCSGSGSGJJJJK 15
Cock ABCCSGGGSGIJJJL 15
* * * * * * : * * * . * * * :
Hen CFCDFCSDFCDERTF 30
Cock CHCDFCSDHCDEGFI 30
* . * * * * * * * : * * :* : : .
The output shud be
where there is : and .
It shud... (4 Replies)
Discussion started by: cdfd123
4 Replies
3. Shell Programming and Scripting
Hello,
I'm new to shell scripting and did a search on the forum to what I want to do but couldn't find anything.
I have about 9 routers that outputs to 1 syslog file daily named cisco.year.mo.date.log ex: cisco.2009.05.11.log
My goal is to make a parsing script that cats today's syslog... (2 Replies)
Discussion started by: jjrambar
2 Replies
4. Shell Programming and Scripting
hi guys,
i want to parse a file using public function, the file contain raw data in the below format i want to get the output like this to load it to Oracle DB
MARWA1,BSS:26,1,3,0,0,0,0,0.00,22,22,22.00
MARWA2,BSS:26,1,3,0,0,0,0,0.00,22,22,22.00
this the file raw format:
Number of... (6 Replies)
Discussion started by: dagigg
6 Replies
5. Shell Programming and Scripting
Hi all,
Is it possible to create an script that parse an snoop output similar to the example above ? Each line is ended by "$" (set list in vi). as a result, I would like to print the output in only one line.
can someone give me some tip ?
Thanks a lot .:)
l version="1.0" ... (5 Replies)
Discussion started by: robdcb
5 Replies
6. Shell Programming and Scripting
Hi I have the following as input
/* ----------------- backupJIL ----------------- */
insert_job: backupJIL job_type: c
command: autorep -J ALL -q > /home/autosys/...p/autosys_jil_bk
machine: machine
owner: autosys@machine
permission: gx,ge,wx,we
date_conditions: 1
days_of_week:... (7 Replies)
Discussion started by: ramky79
7 Replies
7. Shell Programming and Scripting
I'm trying to modify the script given in post 7 of the following thread: 146564-need-parse-jil-file-into-excel-file.html. (Sorry, can't post the URL as I don't have enough posts.)
The original script is as follows:
awk -F ' *_]*: *' 'BEGIN ... (9 Replies)
Discussion started by: GnuScripter
9 Replies
8. Shell Programming and Scripting
Output of the below code includes unmatched date.Please correct it
df -k|awk '$4>50 {print $1, "\t"$4,"\t" $7}'
It gives output less than 50% also. (5 Replies)
Discussion started by: vinil
5 Replies
9. Shell Programming and Scripting
My source file looks like this:
Cust-Number = "101"
Cust-Name="Joe"
Cust-Town="London"
Cust-hobby="tennis"
Cust-purchase="200"
Cust-Number = "102"
Cust-Name="Mary"
Cust-Town="Newyork"
Cust-hobby="reading"
Cust-purchase="125"
Now I want to parse this file (leaving out hobby) and... (10 Replies)
Discussion started by: Balav
10 Replies
10. UNIX for Advanced & Expert Users
Hello,
I am trying to write a script to parse the output of data and then alert based on certain conditions
This is the output of my script
(STRING) Name = Joe
(FLOAT64) BMI = 34
(FLOAT64) Weight = 156
(STRING) Name = Sam
(FLOAT64) BMI = 32
(FLOAT64) Weight = 180
and so on it repeats... (4 Replies)
Discussion started by: sidnow
4 Replies
LEARN ABOUT DEBIAN
px_get_record2
PX_GET_RECORD2(3) Library Functions Manual PX_GET_RECORD2(3)
NAME
PX_get_record2 -- Returns record in Paradox file
SYNOPSIS
#include <paradox.h>
int PX_get_record2(pxdoc_t *pxdoc, int recno, char *data, int *deleted, pxdatablockinfo_t *pxdbinfo)
DESCRIPTION
This function is similar to PX_get_record(3) but takes two extra parameters. If *deleted is set to 1 the function will consider any record
in the database, even those which are deleted. If *pxdbinfo is not NULL, the function will return some information about the data block
where the record has been read from. You will have to allocate memory for pxdbinfo before calling PX_get_record2.
On return *deleted will be set to 1 if the requested record is deleted or 0 if it is not deleted. The struct pxdatablockinfo_t has the fol-
lowing fields:
blockpos (long)
File positon where the block starts. The first six bytes of the block contain the header, followed by the record data.
recordpos (long)
File position where the requested record starts.
size (int)
Size of the data block without the six bytes for the header.
recno (int)
Record number within the data block. The first record in the block has number 0.
numrecords (int)
The number of records in this block.
number (int)
The number of the data block.
This function may return records with invalid data, because records are not explizitly marked as deleted, but rather the size of a valid
data block is modified. A data block is a fixed size area in the file which holds a certain number of records. If for some reason a data
block has newer been completely filled with records, the algorithmn anticipates deleted records in this data block, which are not there.
This often happens with the last data block in a file, which is likely to not being fully filled with records.
If you accessing several records, do it in ascending order, because this is the most efficient way.
Note:
This function is deprecated. Use PX_retrieve_record(3) instead
RETURN VALUE
Returns 0 on success and -1 on failure.
SEE ALSO
PX_get_field(3), PX_get_record(3)
AUTHOR
This manual page was written by Uwe Steinmann uwe@steinmann.cx.
PX_GET_RECORD2(3)