I have a file(Pipe Delimited) where i need to add a blank field before the last field and a blank field after the last field. Please help. I have provided below the sample input records and desired output.
Hi Everybody,
I have an layout file like below
f1 1 char 10,
f2 11 char 2,
f3 13 char 1,
lineend 14 char 1
Their I need to add a new field which would be like
f5 char 3,
f6 char 2
The o/p should be
f1 1 char 10,
f2 11 char 2,
f3 13 char 1,
f5 14 char 3,
f6 17 char 2 (3 Replies)
I have a file with 32 fields each separated by ‘|”. I need to add a file date exactly in the format “ "20100120" “ as the 32nd field moving the existing 32nd field to 33. so the field I added should be 32nd and the 33rd field is the last field before I added the file date.
I know we can... (8 Replies)
I need some help with adding lines to file and substitute a pattern.
Ok I have a file:
#cat names.txt
name: John Doe
stationed: 1
name: Michael Sweets
stationed: 41
.
.
.
And would like to change it to:
name: John Doe
employed
permanently
stationed: 1-office (7 Replies)
hi
i am student doing project in ns2.34.
i hav to add field in route cache and packet of DSR routing protocol.
which files hv to be changed...pl help me (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
want to add field to route cache and packet of DSR routing protocol in ns2.34, add field, DSR package in ns2.34... (2 Replies)
Hi All,
I have a file(Pipe Delimited) where i need to add a blank field before the last field and a blank field after the last field. Please help. I have provided below the sample input records and desired output.
Code:
Sample Input: A0010000|Abilene TX A 1|A0010957|Dallas... (0 Replies)
Hi All,
I get a file on weekly basis from client. I need to write a script which make sure the file should have 20 columns after the first column. If not then the script should add the remaining columns and default them to space(except for 2nd and 3rd). and at the same time the script should... (25 Replies)
Dear AWK-experts!
I did get stuck in the task of combining files after matching fields, so I'm still awkward with learning AWK.
There are 2 files: one containing 3 columns with ID, coding status, and score for long noncoding RNAs:
file1 (1.txt) (>5000 lines)
... (12 Replies)
I have an array in an external file, "array.txt", which contains:
char *testarray={"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"};I want to be able to add an element to this array, and have that element display, whenever I call it, without having to recompile... (29 Replies)
Discussion started by: ignatius
29 Replies
LEARN ABOUT DEBIAN
email::messageid
Email::MessageID(3pm) User Contributed Perl Documentation Email::MessageID(3pm)NAME
Email::MessageID - Generate world unique message-ids.
SYNOPSIS
use Email::MessageID;
my $mid = Email::MessageID->new->in_brackets;
print "Message-ID: $midx0Ax0D";
DESCRIPTION
Message-ids are optional, but highly recommended, headers that identify a message uniquely. This software generates a unique message-id.
METHODS
new
my $mid = Email::MessageID->new;
my $new_mid = Email::MessageID->new( host => $myhost );
This class method constructs an Email::Address object containing a unique message-id. You may specify custom "host" and "user" parameters.
By default, the "host" is generated from "Sys::Hostname::hostname".
By default, the "user" is generated using "Time::HiRes"'s "gettimeofday" and the process ID.
Using these values we have the ability to ensure world uniqueness down to a specific process running on a specific host, and the exact time
down to six digits of microsecond precision.
create_host
my $domain_part = Email::MessageID->create_host;
This method returns the domain part of the message-id.
create_user
my $local_part = Email::MessageID->create_user;
This method returns a unique local part for the message-id. It includes some random data and some predictable data.
in_brackets
When using Email::MessageID directly to populate the "Message-ID" field, be sure to use "in_brackets" to get the string inside angle
brackets:
header => [
...
'Message-Id' => Email::MessageID->new->in_brackets,
],
Don't make this common mistake:
header => [
...
'Message-Id' => Email::MessageID->new->as_string, # WRONG!
],
SEE ALSO
Email::Address, Time::HiRes, Sys::Hostname, perl.
PERL EMAIL PROJECT
This module is maintained by the Perl Email Project.
<http://emailproject.perl.org/wiki/Email::MessageID>
AUTHOR
Casey West, <casey@geeknest.com>.
COPYRIGHT
Copyright (c) 2004 Casey West. All rights reserved.
This module is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
perl v5.10.1 2010-07-15 Email::MessageID(3pm)