Hi guys,
Please guide me if you have a solution to this problem. I have tried paste -s but it's not giving the desired output.
I have a file with the following content-
A123 box1
B345 bat2
C431 my_id
A123 service
C431 box1
A123 my_id
I need two different outputs-
OUTPUT1
A123... (6 Replies)
Hi All,
I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations:
1. I am restrained to 2 input files only.
2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
I have 100 data files labelled 250.1.txt through 250.100.txt. The second column of the data files partially match (there is about %90 overlap). Each data file has 4 columns.
I want the merge all these text files by the matching values in the second column. In the output, the first column should... (1 Reply)
Dear all
I have big file with two columns
A_AA960715 GO:0006952
A_AA960715 GO:0008152
A_AA960715 GO:0016491
A_AA960715 GO:0007165
A_AA960715 GO:0005618
A_AA960716 GO:0006952
A_AA960716 GO:0005618
A_AA960716... (15 Replies)
I have two files
1.txt
34, ABC, 7, 8, 0.9
35, CDE, 6.5, -2, 0.01
2.txt
34, ABC, 9, 6, -1.9
35, CDE, 8.5, -2.3, 5.01
So in both files common columns are 1 and 2
so final o/p should look like
34, ABC, 7, 8, 0.9, 9, 6, -1.9
35, CDE, 6.5, -2, 0.01, 8.5, -2.3, 5.01
I tried using... (3 Replies)
I have the following records from multiple files.
415 A G
415 A G
415 A T
415 A .
415 A .
421 G A
421 G A,C
421 G A
421 G A
421 G A,C
421 G .
427 A C
427 A ... (3 Replies)
Hi,
I have two files A (2190 rows) and file B (1100 rows). I want to merge the contents of two files based on common field, also I need the unmatched rows from file A
file A:
ABC
XYZ
PQR
file B:
>LMN|chr1:11000-12456:
>ABC|chr15:176578-187678:
>PQR|chr3:14567-15866:
output... (3 Replies)
Hi All,
I have 4 files in below format. I took them as an example.
File 1: Cut from position 1-4 then 6-7 then 8-14 then rest left and make them as columns in one new file. Inserting character H to the initial of all line like HCTOT.
CTOT 456787897 Low fever
CTOR 556712345 High fever... (2 Replies)
Hi all,
Say i have multiple files x1 x2 x3 x4, all with common header (date, time, year, age),,
How can I merge them to one singe file "X" in shell scripting
Thanks for your suggestions. (2 Replies)
Discussion started by: msarguru
2 Replies
LEARN ABOUT DEBIAN
text::vcard::addressbook
Text::vCard::Addressbook(3pm) User Contributed Perl Documentation Text::vCard::Addressbook(3pm)NAME
Text::vCard::Addressbook - a package to parse, edit and create multiple vCards (RFC 2426)
SYNOPSIS
use Text::vCard::Addressbook;
my $address_book = Text::vCard::Addressbook->new({
'source_file' => '/path/to/address.vcf',
});
foreach my $vcard ($address_book->vcards()) {
print "Got card for " . $vcard->fullname() . "
";
}
DESCRIPTION
This package provides an API to reading / editing and creating multiple vCards. A vCard is an electronic business card. This package has
been developed based on rfc2426.
You will find that many applications (Apple Address book, MS Outlook, Evolution etc) can export and import vCards.
READING IN VCARDS
load()
use Text::vCard::Addressbook;
# Read in from a list of files
my $address_book = Text::vCard::Addressbook->load( ['foo.vCard', 'Addresses.vcf']);
This method will croak if it is unable to read in any of the files.
import_data()
$address_book->import_data($value);
This method imports data directly from a string.
new()
# Read in from just one file
my $address_book = Text::vCard::Addressbook->new({
'source_file' => '/path/to/address.vcf',
});
This method will croak if it is unable to read in the source_file.
# File already in a string
my $address_book = Text::vCard::Addressbook->new({
'source_text' => $source_text,
});
# Create a new address book
my $address_book = Text::vCard::Addressbook->new();
Looping through all vcards in an address book.
foreach my $vcard ($address_book->vcards()) {
$vcard->...;
}
METHODS
add_vcard()
my $vcard = $address_book->add_vcard();
This method creates a new empty Text::vCard object, stores it in the address book and return it so you can add data to it.
vcards()
my $vcards = $address_book->vcards();
my @vcards = $address_book->vcards();
This method returns a reference to an array or an array of vcards in this address book. This could be an empty list if there are no entries
in the address book.
set_encoding()
$address_book->add_vcard('utf-8');
This method will add the string ';charset=utf-8' to each and every vCard entry. That does help in connection with e.g. an iPhone...
export()
my $vcf_file = $address_book->export()
This method returns the vcard data in the vcf file format.
Please note there is no validation, you must ensure that the correct nodes (FN,N,VERSION) are already added to each vcard if you want to
comply with RFC 2426.
This might not escape the results correctly at the moment.
AUTHOR
Leo Lapworth, LLAP@cuckoo.org
COPYRIGHT
Copyright (c) 2003 Leo Lapworth. All rights reserved. This program is free software; you can redistribute it and/or modify it under the
same terms as Perl itself.
ACKNOWLEDGEMENTS
The authors of Text::vFile::asData for making my life so much easier.
SEE ALSO
Text::vCard, Text::vCard::Node
perl v5.10.1 2011-01-11 Text::vCard::Addressbook(3pm)