12-26-2010
Tell awk the record separator is < so every tag is a different record to be filtered.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have a file in unix in which datas are like this
07 01 abc data entry Z3 data entry ASSISTANT Z3 39
08 01 POD peadiatrist Z4 POD PeDIATRY Z4 67
01 operator specialist 00 operator UNSPECIFIED A0 00
... (12 Replies)
Discussion started by: trichyselva
12 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I want to count the occurences of a specific word in a .txt file in bash shell.
Can somebody help me pleaze??
Thanks!!! (2 Replies)
Discussion started by: mskart
2 Replies
3. UNIX for Dummies Questions & Answers
Hello People,
I have the following contents in an XML file
...........
...........
..........
...........
<Details = "Sample Details">
<Name>Bob</Name>
<Age>34</Age>
<Address>CA</Address>
<ContactNumber>1234</ContactNumber>
</Details>
...........
.............
.............. (4 Replies)
Discussion started by: sushant172
4 Replies
4. UNIX for Dummies Questions & Answers
the data in my file is has no delimiters. it looks like this:
H52082320024740010PH333200612290000930 0.0020080131
D5208232002474000120070306200703060580T1502 TT 1.00
H52082320029180003PH333200702150001 30 100.0020080205
D5208232002918000120070726200707260580T1502 ... (3 Replies)
Discussion started by: jclanc8
3 Replies
5. Shell Programming and Scripting
I have a file which looks like this:
73450 articles and news developmental psychology 2006-03-30 16:22:40 1 http://www.usnews.com
73450 articles and news developmental psychology 2006-03-30 16:22:40 2 http://www.apa.org
73450 articles and news developmental psychology 2006-03-30... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
6. Shell Programming and Scripting
Hi,
In my file (which is "," delimited and text qualifier is "), I have to extract a particualr field.
file1:
1,"aa,b",4
expected is the 2nd field:
aa,b
I tried the basic cut -d "," -f 2 file 1, this gave me
aa alone instead aa,b.
A small hint ot help on this will be very... (5 Replies)
Discussion started by: machomaddy
5 Replies
7. Shell Programming and Scripting
Hi,
I am new to shell scripting. I need to extract data between repeating tags from an xml file and store the data in an array to process it further.
<ns1:root xmlns:ns1="http://example.com/config">
<ns1:interface>in1</ns1:interface>
<ns1:operation attribute1="true" attribute2="abd"... (2 Replies)
Discussion started by: sailendra
2 Replies
8. UNIX for Dummies Questions & Answers
I have tried the following to no avail.
xargs -n8 < test.txt
awk '{if(NR%6!=0){p=""}else{p="\n"};printf $0" "p}' Mod_Alm_log.txt > test.txt
I have tried different variations of the above, the problem is mixes lines together.
And it includes the tags "%a and %A" I need them to be all tab... (16 Replies)
Discussion started by: mytouchsr
16 Replies
9. Shell Programming and Scripting
Hi..need help on how to extract a particular xml file only from an xml jar file... thanks! (2 Replies)
Discussion started by: qwerty000
2 Replies
10. Shell Programming and Scripting
Hello Shell Gurus,
I have a requirement to get the specific tags from a XML file.
Here is my code snippet
<jdbc-system-resource>
<name>SDPData Source</name>
<target>AdminServer,osb_server1,soa_server1</target>
... (30 Replies)
Discussion started by: Siv51427882
30 Replies
LEARN ABOUT DEBIAN
marc::file::microlif
MARC::File::MicroLIF(3pm) User Contributed Perl Documentation MARC::File::MicroLIF(3pm)
NAME
MARC::File::MicroLIF - MicroLIF-specific file handling
SYNOPSIS
use MARC::File::MicroLIF;
my $file = MARC::File::MicroLIF->in( $filename );
while ( my $marc = $file->next() ) {
# Do something
}
$file->close();
undef $file;
EXPORT
None.
The buffer must be large enough to handle any valid record because we don't check for cases like a CR/LF pair or an end-of-record/CR/LF
trio being only partially in the buffer.
The max valid record is the max MARC record size(99999) plus one or two characters per tag (CR, LF, or CR/LF). It's hard to say what the
max number of tags is, so here we use 6000. (6000 tags can be squeezed into a MARC record only if every tag has only one subfield
containing a maximum of one character, or if data from multiple tags overlaps in the MARC record body. We're pretty safe.)
METHODS
in()
Opens a MicroLIF file for reading.
Gets the next chunk of data. If $want_line is true then you get the next chunk ending with any combination of
and
of any length. If
it is false or not passed then you get the next chunk ending with x60 followed by any combination of
and
of any length.
All trailing
and
are stripped.
header()
If the MicroLIF file has a file header then the header is returned. If the file has no header or the file has not yet been opened then
"undef" is returned.
decode()
Decodes a MicroLIF record and returns a USMARC record.
Can be called in one of three different ways:
$object->decode( $lif )
MARC::File::MicroLIF->decode( $lif )
MARC::File::MicroLIF::decode( $lif )
TODO
RELATED MODULES
MARC::File
LICENSE
This code may be distributed under the same terms as Perl itself.
Please note that these modules are not products of or supported by the employers of the various contributors to the code.
AUTHOR
Andy Lester, "<andy@petdance.com>"
perl v5.10.1 2010-03-29 MARC::File::MicroLIF(3pm)