Hi,
I just wandering how to split a record which has more than one delimiter,
i have a file which contains pattern as group separtor and ~ as field separtor, Ultimately I need consider even the groups as a field, So i need to make this multi-delimited file into ~ delimited file.
My record... (4 Replies)
hi, pls someone tell me how to extract delimiters from any file and pass it to a unix script.since, im a beginner in unix i find it little bit difficult.how to use awk to do this? (9 Replies)
Hi
I have a file in which delimiter is ';'
However if the delimiter is within "" it is a part of the string and not delimiter.
How to get the fields ? I want to replace the delimiter ';' to '|'.
The file contains data like this :
11111; “2222 2222”; “3333; 3333”; “4444 ""44444”
The file... (2 Replies)
Hello,
I am trying to find the record count in a specific folder,
Here is the part of the code
===========================
STARTDATE=`date +"%y%m%d%H%M"`
for i in `ls *.DAT`
do
wc -l $i >> /XYZ/SrcFiles/"Record_counts"$STARTDATE.csv
... (2 Replies)
Hi All,
I woul like to know with out opening a file in unix ,how we can find out what is the delemeter in that file...
Thanks..
edit by bakunin: changed thread title to "delimiter" so it can be found. (4 Replies)
Hi there,
I am with this one column input text file to change layout, please help. Thanks. I have awk, sed.
$ cat input
Median
1.0
2.3
3.0
Median
35.0
26.3
45.7
10.1
63.1
Median
1.2
2.3 (8 Replies)
Hi,
I have a No Delimiter variable length text file with following schema -
Column Name Data length
Firstname 5
Lastname 5
age 3
phoneno1 10
phoneno2 10
phoneno3 10
sample data - ... (16 Replies)
Hi,
I have a input
/dev/cm/test1.txt
/qa/tm/hmkr/cc/test2.txt
and I need an out like below
foldername, filename
/dev/cm/,test1.txt
/qa/tm/hmkr/cc/,test2.txt
I tried with awk $NF, but I'm getting the filenames and not folder names. Please let me know how to achive the above... (5 Replies)
Hi,
Extremely new to Perl scripting, but need a quick fix without using TEXT::CSV
I need to read in a file, pass any delimiter as an argument, and convert it to bar delimited on the output. In addition, enclose fields within double quotes in case of any embedded delimiters.
Any help would... (2 Replies)
Discussion started by: JPB1977
2 Replies
LEARN ABOUT DEBIAN
mail::server::imap4::list
Mail::Server::IMAP4::List(3pm) User Contributed Perl Documentation Mail::Server::IMAP4::List(3pm)NAME
Mail::Server::IMAP4::List - folder related IMAP4 answers
SYNOPSIS
my $imap = Mail::Server::IMAP4::List->new
( folders => $folders # Mail::Box::Identity
, inbox => $inbox # Mail::Box
, delimiter => '#'
);
my $imap = Mail::Server::IMAP4::List->new(user => $user);
print $imap->list(...); # for LIST command
METHODS
Constructors
Mail::Server::IMAP4::List->new(USER)
Create a (temporary) object to handle the LIST requests for a certain user, based upon a set of folders. The data is kept by
Mail::Box::Identity and Mail::Box::Collection objects, which mean that the folders will not be opened to answer these questions.
-Option--Default
delimeter '/'
folders <from user>
inbox <from user>
user <undef>
delimeter => STRING|CODE
Either the constant delimiter, or a code reference which will get passed a folder name and should return the delimiter string used in
that name. If that folder name is empty, the default delimiter must be reported. See delimiter() for an example.
folders => OBJECT
You need to specify either a set of folders explicitly or via the user. Some Mail::Box::Identity OBJECT is needed.
inbox => BOOLEAN
For now, only used to see whether there is an inbox, so a truth value will do. This may change in the future. By default, the flag
is set if "$user-"inbox> is defined.
user => OBJECT
A Mail::Box::Manage::User OBJECT, representing the user who's folders must get reported.
Attributes
$obj->delimiter([FOLDERNAME])
Returns the delimiter string. The foldername is only required when a CODE reference was specified at initiation.
example: setting-up an IMAP4 delimeter
sub delim($)
{ my $path = shift;
my ($delim, $root)
= $path =~ m/^(#news.)/ ? ('.', $1)
= $path =~ m!^/! ? ('/', '/')
: ('/', '');
wantarray ? ($delim, $root) : $delim;
}
my $list = Mail::Server::IMAP4::List->new(delimiter => &delim, ...);
print $list->delimiter('abc/xyz'); # returns a / (slash) and ''
print $list->delimiter('#news.feed'); # returns a . (dot) and $news.
print $list->delimiter(''); # returns default delimiter
$obj->folders()
Returns the Mail::Box::Identity of the toplevel folder.
$obj->inbox()
Returns the Mail::Box or filename of the INBOX.
$obj->user()
Returns the Mail::Box::Manage::User object, if defined.
IMAP Commands
$obj->list(BASE, PATTERN)
IMAP's LIST command. The request must be partially decoded, the answer will need to be encoded.
example: using IMAP list
my $imap = Mail::Server::IMAP4::List->new(delimiter => &delim, ...);
local $" = ';';
my @lines = $imap->list('', ''); # returns the default delimiter
print ">@{$lines[0]}<"; # >(Noselect);/;<
my @lines = $imap->list('#news',''); # specific delimiter
print ">@{$lines[0]}<"; # >(Noselect);.;<
my @lines = $imap->list('top/x/', '%');
print ">@$_<," foreach @lines; # >();/;/tmp/x/y<,>(Marked);/;/tmp/x/z<
DETAILS
See
RFC2060: "Internet Message Access Protocol IMAP4v1"
sections 6.3.8 (LIST question) and 7.2.2 (LIST answer)
SEE ALSO
This module is part of Mail-Box distribution version 2.105, built on May 07, 2012. Website: http://perl.overmeer.net/mailbox/
LICENSE
Copyrights 2001-2012 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See
http://www.perl.com/perl/misc/Artistic.html
perl v5.14.2 2012-05-07 Mail::Server::IMAP4::List(3pm)