Hi
I have 2 files:-
1. List of files which consists of names of some output files.
2. A delimited file; delimted by "|"
I want to replace the value of the $23 (23rd column) in the delimited file with name in the first file. It is always position to position. Meaning first row of the first... (5 Replies)
Hi all,
I have 2 files. One contains only 1 column and other one contains 2 columns, let say 1_col.txt and 2_col.txt respectively. Here, I will try to explain with an example.
Input files :
1_col.txt 2_col.txt
a a b
x a c
p ... (5 Replies)
- 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)
Hi
I have a file which has values in each line:
MP304,d40000
MP310,ff0000
etc
I have another file which as the first value in it and is unique in the file(not repeated). I need to replace a string with the second value above. The second file contents is as follows:(snippet)
<g
... (12 Replies)
Hi,
I have 2 input files:
File 1:
echo Name > create_Name.txt
echo Group /dir/group, Name >> create_Name.txt
File 2:
Name AAA BBB CCC
group A B C
dir A1 B1 C1
................................
Need to replace the contents of File 1 with column 2, 3 & 4 values of File 2... (8 Replies)
I have a file containing multiple values, some of them are pipe separated which are to be read as separate values and some of them are single value all are these need to store in variables.
I need to read this file which is an input to my script
Config.txt
file name, first path, second... (7 Replies)
Hi,
I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below...
if (start_new_rec=="true"){
exclude_user="false";
user=toupper($6);
match(user, "XXXXX.");
if (RSTART ==2 ) {
... (9 Replies)
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (4 Replies)
Hi,
I have two files with values in both.
File1:
cat 2 3
dog 4 5
elephant 6 7
camel 2 3
File2:
----+--gkf;ajf=
---+----
+----- cat -------=----+ 3 | 4 ----- dog ------++-- 5 | 9 ----++-- elephant |
5 | 7
---++ camel ------ ++++_---- || 8 | 9
I want the final file as:
cat 4... (1 Reply)
Discussion started by: npatwardhan
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)