Help with replace column one content based on reference file
Input file
Reference file
Output file
I would like to replace those content that shown in column 1 of input file with the content that shown in reference file (if available).
Thanks.
Hi,
This is something that probably it is more difficult to explain than to do.
I have two files e.g.
FILE1
A15 8.3102E+00 3.2000E-04
A15 8.5688E+00 4.3000E-05
B13 5.1100E-01 1.9960E+00
B16 5.1100E-01 2.3000E-03
B16 8.6770E-01 1.0000E-07
B16 9.8693E-01 3.4000E-05... (4 Replies)
i have a input of csv file as below but the sequence of column get changed.
I,e it is not necessary that name comes first then age and rest all, it may vary.
name,age,marks,roll,section
kevin,25,80,456,A
Satch,23,56,789,B
Meena,24,78,H245,C
So i want to print that column entires which... (12 Replies)
Gents,
Can you please help me to solve this case
In my input file I have a values in column 49 which always need to be one, but sometimes the system create a value 2, in this case I need to go to search in the original file and replace the values in the row where the value 2 is and in the... (6 Replies)
I have a file which contains timestamp and date in the second column. If the line contains one of the word then it need to be replace like below. Any help is appreciated.
File:
a smallint
b timestamp
c date
d varchar
O/P:
a smallint
... (1 Reply)
Hello Everyone..
I want to replace the retail col from FileI with cstp1 col from FileP if the strpno matches in both files
FileP.txt
... (2 Replies)
Discussion started by: YogeshG
2 Replies
LEARN ABOUT DEBIAN
dist::metadata::struct
Dist::Metadata::Struct(3pm) User Contributed Perl Documentation Dist::Metadata::Struct(3pm)NAME
Dist::Metadata::Struct - Enable Dist::Metadata for a data structure
VERSION
version 0.923
SYNOPSIS
my $dm = Dist::Metadata->new(struct => {
files => {
'lib/Mod.pm' => 'package Mod; sub something { ... }',
'README' => 'this is a fake dist, useful for testing',
}
});
DESCRIPTION
This is a subclass of Dist::Metadata::Dist to enable mocking up a dist from perl data structures.
This is mostly used for testing but might be useful if you already have an in-memory representation of a dist that you'd like to examine.
It's probably not very useful on it's own though, and should be used from "new" in Dist::Metadata.
METHODS
new
$dist = Dist::Metadata::Struct->new(files => {
'lib/Mod.pm' => 'package Mod; sub something { ... }',
});
Accepts a "files" parameter that should be a hash of "{ name => content, }". Content can be a string, a reference to a string, or an IO
object.
default_file_spec
"Unix" is the default for consistency/simplicity but "file_spec" can be overridden in the constructor.
file_content
Returns the string content for the specified name.
find_files
Returns the keys of the "files" hash.
AUTHOR
Randy Stauner <rwstauner@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Randy Stauner.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-06-19 Dist::Metadata::Struct(3pm)