Could you please try following and let me know if this helps you.
Output will be as follows. EDIT: Adding a non-one liner form of solution too now.
Thanks,
R. Singh
Last edited by RavinderSingh13; 11-15-2017 at 09:54 AM..
Reason: Adding a non-one liner form of solution too now.
This User Gave Thanks to RavinderSingh13 For This Post:
I need an assistance in file generation using awk, sed or anything...
I have a big file that i need to filter desired parts only. The objective is to select (and print) the report # having the string "apple" on 2 consecutive lines in every report. Please note that the "apple" line has a HEX... (1 Reply)
I want to filter records in one of my file using AWK command (or anyother command). I am using the below code
awk -F@ '$1=="0003"&&"$2==20100402" print {$0}' $INPUT > $OUTPUT
I want to pass the 0003 and 20100402 values through a variable. How can I do this?
Any help is much... (1 Reply)
Dear all,
I am using awk to filter some data like this:-
awk 'NR==FNR{a;next}($1 in a)' FS=":" filter.dat data.dat >! out.dat where the filter and input data look like this:-
filter.dat...
n_o00j_1900_40_007195350_0:n_o00j_1940_40_007308526... (3 Replies)
I have a main file:
...
17,466971 0,095185 17,562156 id 676
17,466971 0,096694 17,563665 id 677
17,466971 0,09816 17,565131 id 678
17,466971 0,099625 17,566596 id 679
17,466971 0,101091 17,568062 id 680
17,466971 0,016175 17,483146 id... (4 Replies)
Hi,
I would like extract some lines from file csv using awk , below the example:
I have the file test.csv with in content below.
FLUSSO;COD;DATA_LAV;ESITO
ULL;78;17/09/2013;OL
ULL;45;05/09/2013;Apertura
NP;45;13/09/2013;Riallineamento
ULLNP;78;17/09/2013;OL
NPG;14;12/09/2013;AperturaTK... (6 Replies)
I have a very large tab-delimited, ~2GB file2 that I am trying to filter using $2 of file1. If $2 of file1 is in the range of $2 and $3 in file1 then the entire line of file2 is outputed. If the range match is not found then that line is skipped. The awk below does run but no output results. ... (3 Replies)
In the below awk if I use the attached file as the input, I get no results for TCF4. However, if I just copy that line from the attached file and use that as input I get results for TCF4.
Basically the gene file is a 1 column list that is used to filter $8 of the attached file. When there is a... (9 Replies)
The below awk will filter a list of 30,000 lines in the tab-delimited file. What I am having trouble with is adding a condition to SVTYPE=CNV
that will only print that line if CI= must be >.05 .
The other condition to add is if SVTYPE=Fusion, then in order to print that line
READ_COUNT must... (3 Replies)
I have two files and would need to filter out records based on certain criteria, these column are of variable lengths, but the lengths are uniform throughout all the records of the file. I have shown a sample of three records below. Line 1-9 is the item number "0227546_1" in the case of the first... (15 Replies)
Discussion started by: MIA651
15 Replies
LEARN ABOUT DEBIAN
rdf::vcard
RDF::vCard(3pm) User Contributed Perl Documentation RDF::vCard(3pm)NAME
RDF::vCard - convert between RDF and vCard
SYNOPSIS
use RDF::vCard;
use RDF::TrineShortcuts qw(rdf_string);
my $input = "http://example.com/contact-data.rdf";
my $exporter = RDF::vCard::Exporter->new;
my $data = join '', $exporter->export_cards($input);
print $data; # vCard 3.0 data
my $importer = RDF::vCard::Importer->new;
$importer->import_string($data);
print rdf_string($importer->model => 'RDFXML');
DESCRIPTION
This module doesn't do anything itself; it just loads RDF::vCard::Exporter and RDF::vCard::Importer for you.
RDF::vCard::Exporter
RDF::vCard::Exporter takes some RDF using the W3C's vCard vocabulary, and outputs RDF::vCard::Entity objects.
RDF::vCard::Importer
RDF::vCard::Importer does the reverse.
RDF::vCard::Entity
An RDF::vCard::Entity objects is an individual vCard. It overloads stringification, so just treat it like a string.
RDF::vCard::Entity::WithXmlSupport
RDF::vCard::Entity::WithXmlSupport is a subclass of RDF::vCard::Entity, with a "to_xml" method. It requires XML::LibXML to be installed and
working. The importer and exporter will try to create these if possible.
RDF::vCard::Line
RDF::vCard::Line is internal fu that you probably don't want to touch.
BUGS
If your RDF asserts that Alice is Bob's AGENT and Bob is Alice's AGENT, then RDF::vCard::Export will eat your face. Don't do it.
Please report any other bugs to https://rt.cpan.org/Public/Dist/Display.html?Name=RDF-vCard
<https://rt.cpan.org/Public/Dist/Display.html?Name=RDF-vCard>.
SEE ALSO
http://www.w3.org/Submission/vcard-rdf/ <http://www.w3.org/Submission/vcard-rdf/>.
<http://perlrdf.org/>.
RDF::vCard::Babelfish.
AUTHOR
Toby Inkster <tobyink@cpan.org>.
COPYRIGHT
Copyright 2011 Toby Inkster
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-06-23 RDF::vCard(3pm)