04-26-2012
Santoshbn@
Post what have you tried so far.
You have just posted the question alone. This is not an answer service, its a forum where you have to show what have you tried, so that others can chime in to provide any help
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have two files like
File1 : will get this file from "who" command. It is a unix file.
user val1 Jul 29 13:15 (IP Address1)
user val3 Jul 30 03:21 (IP Address2)
user val2 Jul 29 13:16 (IP Address3)
user val4 Jul 29 13:17 (IP Address4)
... (4 Replies)
Discussion started by: manneni prakash
4 Replies
2. Shell Programming and Scripting
First, thanks for the help in previous posts... couldn't have gotten where I am now without it!
So here is what I have, I use AWK to match $1 and $2 as 1 string in file1 to $1 and $2 as 1 string in file2. Now I'm wondering if I can extend this AWK command to incorporate the following:
If $1... (4 Replies)
Discussion started by: right_coaster
4 Replies
3. Shell Programming and Scripting
I have 2 zip files which have about 20 million records in each file. file 2 will have additional records than file 1. I want to compare the records in both the files and capture the new records from file 2 into another file file3. Please help me with a command/script which provides me the desired... (8 Replies)
Discussion started by: koneru
8 Replies
4. UNIX for Dummies Questions & Answers
I have two files in UNIX.
1st file is Entity and Second File is References. 1st File has only one column named Entity ID and 2nd file has two columns Entity ID | Person ID.
I want to produce a output file where entity id's are matching in both the files.
Entity File
624197
624252
624264... (4 Replies)
Discussion started by: PRS
4 Replies
5. Shell Programming and Scripting
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- I am trying to compare the values of Column1 of File1 with Column1 of File2. If a match is found, print the corresponding value from Column2 of File1 in Column5 of File2.
- I tried to modify and use... (10 Replies)
Discussion started by: Santoshbn
10 Replies
6. Shell Programming and Scripting
Hi Friends,
Need Help. I have file1.txt as
File1.txt
|123|A|7267|Hyder|Cross|Sell|7801
|995|A|7051|2008|Lunar|New|Year|Promotion|7801
|996|A|7022|Q108|Targ|Prospect|&|SSCC|Savings|Promo|7801
|997|A|7182|Q1|Feb-Apr|08|Credit|ITA|PA|SBA|Campaign|7801
File2.txt... (7 Replies)
Discussion started by: i150371485
7 Replies
7. Shell Programming and Scripting
Hi Freinds,
I have 2 files . one is source.txt and second one is target.txt. I want to keep source.txt as baseline and compare target.txt. please find the data in 2 files and Expected output.
Source.txt
1|HYD|NAG|TRA|34.5|1234
2|CHE|ESW|DES|36.5|134
3|BAN|MEH|TRA|33.5|234... (5 Replies)
Discussion started by: i150371485
5 Replies
8. Shell Programming and Scripting
Good morning all,
I have a problem that is one step beyond a standard awk compare.
I would like to compare three files which have several thousand records against a fourth file. All of them have a value in each row that is identical, and one value in each of those rows which may be duplicated... (1 Reply)
Discussion started by: nashton
1 Replies
9. Shell Programming and Scripting
Hi
I have two files file1 and file2
File1 10,000 entries:It has 3 columns below.
conn=232257 client=xxx.xxx.xx.xxx:60491 protocol=LDAP
File2 has 500 entries It has two columns.
conn=232257 dn="uid=xxxx,ou=xxxx,ou=xxxx,dc=xxxxx,dc=xxxx"
conn=232398... (10 Replies)
Discussion started by: buzzme
10 Replies
10. UNIX for Beginners Questions & Answers
hi
I have 2 file with more than 10 columns for both
1st file
apple,0,0,0......
orange,1,2,3.....
mango,2,4,5.....
2nd file
apple,2,3,4,5,6,7...
orange,2,3,4,5,6,8...
watermerlon,2,3,4,5,6,abc...
mango,5,6,7,4,6,def.... (1 Reply)
Discussion started by: tententen
1 Replies
LEARN ABOUT DEBIAN
marc::file
MARC::File(3pm) User Contributed Perl Documentation MARC::File(3pm)
NAME
MARC::File - Base class for files of MARC records
SYNOPSIS
use MARC::File::USMARC;
# If you have werid control fields...
use MARC::Field;
MARC::Field->allow_controlfield_tags('FMT', 'LDX');
my $file = MARC::File::USMARC->in( $filename );
while ( my $marc = $file->next() ) {
# Do something
}
$file->close();
undef $file;
EXPORT
None.
METHODS
in()
Opens a file for import. Ordinarily you will use "MARC::File::USMARC" or "MARC::File::MicroLIF" to do this.
my $file = MARC::File::USMARC->in( 'file.marc' );
Returns a "MARC::File" object, or "undef" on failure. If you encountered an error the error message will be stored in $MARC::File::ERROR.
Optionally you can also pass in a filehandle, and "MARC::File". will "do the right thing".
my $handle = IO::File->new( 'gunzip -c file.marc.gz |' );
my $file = MARC::File::USMARC->in( $handle );
next( [&filter_func] )
Reads the next record from the file handle passed in.
The $filter_func is a reference to a filtering function. Currently, only USMARC records support this. See MARC::File::USMARC's "decode()"
function for details.
Returns a MARC::Record reference, or "undef" on error.
skip()
Skips over the next record in the file. Same as "next()", without the overhead of parsing a record you're going to throw away anyway.
Returns 1 or undef.
warnings()
Simlilar to the methods in MARC::Record and MARC::Batch, "warnings()" will return any warnings that have accumulated while processing this
file; and as a side-effect will clear the warnings buffer.
close()
Closes the file, both from the object's point of view, and the actual file.
write()
Writes a record to the output file. This method must be overridden in your subclass.
decode()
Decodes a record into a USMARC format. This method must be overridden in your subclass.
RELATED MODULES
MARC::Record
TODO
o "out()" method
We only handle files for input right now.
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(3pm)