I have a large file and many lines are duplicated. I'm trying to delete lines with every second occurrence of a pattern. Did tried searching similar question but no luck.
I can delete all lines matching pattern with :g/pattern/d but don't want to lose data.
Sample pattern to delete John-------Doe
Last edited by rbatte1; 03-26-2015 at 01:43 PM..
Reason: Added ICODE tags
Hi
I need a perl onliner which seaches a line starting with a pattern(last occurence) and display it.
similar to
grep 'pattern' filename | tail -1 in UNIX
Ex: I want to display the line starting with "cool" and which is a last occurence
adadfadafadf
adfadadf
cool dfadfadfadfara... (4 Replies)
Hi,
I have file 1.txt with following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433
**
**
**
In file 2.txt I have the following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433... (4 Replies)
I have a file that will sometimes contain a pattern. The pattern is this:
W/D FRM CHK 00
I want to find any lines with this pattern, delete those lines, and also delete the line above and the line below. (1 Reply)
I have a file that will sometimes contain a pattern. The pattern is this:
FRM CHK 0000
I want to find any lines with this pattern, delete those lines, and also delete the line above and the line below. (4 Replies)
hi all
i want to delete a line upto a particular character. here is example.
cp cms/images/wifi-zone.png
i want to delete the line till . (cp cms/images/wifi-zone.) so the output wud be "png" only
how can i do it?
also please note down that dot (.) can also occur multiple... (12 Replies)
Hi
I have to replace a pattern found in the first uncommented line in a file. The challenge I'm facing is there are several such similar lines but I have to edit only the first uncommented line.
Eg:
#this is example
#/root/xyz:Old_Pattern
/root/xyz:Old_Pattern
/root/xyz:Old_Pattern
... (10 Replies)
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Hi,
I have a simple problem but i guess stupid enough to figure it out. i have thousands rows of data. and i need to find match patterns of two columns and print the number of rows. for example:
inputfile
abd abp 123
abc abc 325
ndc ndc 451
mjk lkj... (3 Replies)
Hello,
Environment:
I am under Ubuntu 18.04 bionic. I have an sql file consisting of 10K lines.
Objective:
What I am trying to attain is to remove everything coming after 2nd tab in each line. While searching for the answer, I found two answers and both gave expected result just for the first... (2 Replies)
Hello.
Here is a file contents :
declare -Ax NEW_FORCE_IGNORE_ARRAY=(="§" ="§" ="§" ="§" ="§" .................. ="§"Here is a pattern
=I want to extract 'NEW_FORCE_IGNORE_ARRAY' which is the whole word before the first occurrence of pattern '='
Is there a better solution than mine :... (3 Replies)
Discussion started by: jcdole
3 Replies
LEARN ABOUT DEBIAN
biber::input::file::biblatexml
Biber::Input::file::biblatexml(3pm) User Contributed Perl Documentation Biber::Input::file::biblatexml(3pm)
extract_entries
Main data extraction routine.
Accepts a data source identifier (filename in this case),
preprocesses the file and then looks for the passed keys,
creating entries when it finds them and passes out an
array of keys it didn't find.
create_entry
Create a Biber::Entry object from an entry found in a biblatexml data source
parsename
Given a name node, this function returns a Biber::Entry::Name object
Returns an object which internally looks a bit like this:
{ firstname => 'John',
firstname_i => 'J',
middlename => 'Fred',
middlename_i => 'F',
lastname => 'Doe',
lastname_i => 'D',
prefix => undef,
prefix_i => undef,
suffix => undef,
suffix_i => undef,
namestring => 'Doe, John Fred',
nameinitstring => 'Doe_JF',
gender => sm
NAME
Biber::Input::file::biblatexml - look in a BibLaTeXML file for an entry and create it if found
DESCRIPTION
Provides the extract_entries() method to get entries from a biblatexml data source and instantiate Biber::Entry objects for what it finds
AUTHOR
Francois Charette, "<firmicus at ankabut.net>" Philip Kime "<philip at kime.org.uk>"
BUGS
Please report any bugs or feature requests on our sourceforge tracker at <https://sourceforge.net/tracker2/?func=browse&group_id=228270>.
COPYRIGHT & LICENSE
Copyright 2009-2012 Francois Charette and Philip Kime, all rights reserved.
This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of
merchantability or fitness for a particular purpose.
perl v5.14.2 2012-06-17 Biber::Input::file::biblatexml(3pm)