i have a text its contain many record, but its written in one line,
i want to remove from that line the duplicate record,
not record have fixed width ex: width = 4
inputfile test.txt =abc cdf abc abc cdf fgh fgh abc abc
i want the outputfile =abc cdf fgh
only those records
can any one help... (4 Replies)
Hi all,
I have a out.log file
CARR|02/26/2006 10:58:30.107|CDxAcct=1405157051
CARR|02/26/2006 11:11:30.107|CDxAcct=1405157051
CARR|02/26/2006 11:18:30.107|CDxAcct=7659579782
CARR|02/26/2006 11:28:30.107|CDxAcct=9534922327
CARR|02/26/2006 11:38:30.107|CDxAcct=9534922327
CARR|02/26/2006... (3 Replies)
Hi all,
I have a text file fileA.txt
DXRV|02/28/2006 11:36:49.049|SAC||||CDxAcct=2420991350
DXRV|02/28/2006 11:37:06.404|SAC||||CDxAcct=6070970034
DXRV|02/28/2006 11:37:25.740|SAC||||CDxAcct=2420991350
DXRV|02/28/2006 11:38:32.633|SAC||||CDxAcct=6070970034
DXRV|02/28/2006... (2 Replies)
Hello,
I have a log file which is generated by a script which looks like this:
userid: 7
starttime: Sat May 24 23:24:13 CEST 2008
endtime: Sat May 24 23:26:57 CEST 2008
total time spent: 2.73072 minutes / 163.843 seconds
date: Sat Jun 7 16:09:03 CEST 2008
userid: 8
starttime: Sun May... (7 Replies)
Hi,
I have a list of numbers stored in an array as below.
5 7 10 30 30 40 50
Please advise how could I remove the duplicate value in the array ?
Thanks in advance. (5 Replies)
Hi,
I am tryung to use shell or perl to remove duplicate characters
for example , if I have " I love google" it will become I love ggle"
or even "I loveggle" if removing duplicate white space
Thanks
CC (6 Replies)
HI
I have file contains 1000'f of duplicate id's with (upper and lower first character) as below
i/p:
a411532A411532a508661A508661c411532C411532
Requirement: But i need to ignore lowercase id's and need only below id's
o/p:
A411532
A508661
C411532 (9 Replies)
Hi ,
I have a pipe seperated file repo.psv where i need to remove duplicates based on the 1st column only. Can anyone help with a Unix script ?
Input:
15277105||Common Stick|ESHR||Common Stock|CYRO AB
15277105||Common Stick|ESHR||Common Stock|CYRO AB
16111278||Common Stick|ESHR||Common... (12 Replies)
Hi,
i am working on a script that would remove records or lines in a flat file. The only difference in the file is the "NOT NULL" word. Please see below example of the input file.
INPUT FILE:>
CREATE a
(
TRIAL_CLIENT NOT NULL VARCHAR2(60),
TRIAL_FUND NOT NULL... (3 Replies)
Discussion started by: reignangel2003
3 Replies
LEARN ABOUT DEBIAN
test::email
Test::Email(3pm) User Contributed Perl Documentation Test::Email(3pm)NAME
Test::Email - Test Email Contents
SYNOPSIS
use Test::Email;
# is-a MIME::Entity
my $email = Test::Email->new(@lines);
# all-in-one test
$email->ok({
# optional search parameters
from => ($is or qr/$regex/),
subject => ($is or qr/$regex/),
body => ($is or qr/$regex/),
headername => ($is or qr/$regex/),
}, "passed tests");
# single-test header methods
$email->header_is($header_name, $value, "$header_name matches");
$email->header_ok($header_name, $value, "$header_name matches");
$email->header_like($header_name, qr/regex/, "$header_name matches");
# single-test body methods
$email->body_is($header_name, $value, "$header_name matches");
$email->body_ok($header_name, $value, "$header_name matches");
$email->body_like($header_name, qr/regex/, "$header_name matches");
# how many MIME parts does the messages contain?
$email->parts_ok($parts_count, "there were $parts_count parts found");
# what is the MIME type of the firs part
my @parts = $email->parts(); # see MIME::Entity
$parts[0]->mime_type_ok('test/html', 'the first part is type text/html');
DESCRIPTION
Please note that this is ALPHA CODE. As such, the interface is likely to change.
Test::Email is a subclass of MIME::Entity, with the above methods. If you want the messages fetched from a POP3 account, use Test::POP3.
Tests for equality remove trailing newlines from strings before testing. This is because some mail messages have newlines appended to them
during the mailing process, which could cause unnecessary confusion.
This module should be 100% self-explanatory. If not, then please look at Test::Simple and Test::More for clarification.
METHODS
"my $email = Test::Email->new($lines_aref);"
This is identical to "MIME::Entity->new()". See there for details.
"$email->ok($test_href, $description);"
Using this method, you can test multiple qualities of an email message with one test. This will execute the tests as expected and will
produce output just like "Test::Simple::ok" and "Test::More::ok". Keys for $test_href are either "body", or they are considered to be
the name of a header, case-insensitive.
single-test methods
The single-test methods in the synopsis above are very similar to their counterparts in Test::Simple and Test::More. Please consult
those modules for documentation.
Please note that tests for equality remove newlines from their operands before testing. This is because some email messages have
newlines appended to them during mailing.
"my $ok = $email-"parts_ok($parts_count, $description);>
Check to see how many MIME parts this email contains. Each part is also a Test::Email object.
"my $ok = $email-"mime_type_ok($expected_mime_type, $description);>
Check the MIME type of an email or an email part.
EXPORT
None.
SEE ALSO
Test::Builder, Test::Simple, Test::More, Test::POP3
TODO
I am open to suggestions.
AUTHOR
James Tolley, <james@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2007-2008 by James Tolley
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or,
at your option, any later version of Perl 5 you may have available.
perl v5.10.0 2008-10-24 Test::Email(3pm)