Hi,
My file looks like
abc$%sdfhs$%sdf$%sdfaf$%
here as seen delimiter is $%...now how cas i take out second field as cut command expect delimiter as single charecter only.....is there is any other way
thanks and regards
mahabunta (9 Replies)
Guys,
Can any one tell me how can we cut the columns and move each column in to a separate file using awk?
I have a tab delimited file as shown below,
1213 wattt werree
2345 skhasdjh aasas
I want to output this in to three files named a.txt,b.txt and c.txt
say a.txt... (3 Replies)
I have a 30 column tab delimited record file. I need to extract the first 10column. The following command to cut was not working
cut -f 1-10 -d "\t" filename.
Could any one keep on this .
Thanks in Advance (4 Replies)
Hi,
In the below line
a|b|10065353|tefe|rhraqs|135364|5347575
dgd|rg|4333|fhra|grhrt|46423|urdsgd
Here i want to cut the characters in between the second and third pipe delimiter and then between fifth and sixth delimiter and retain the rest of the line.
My output should be
... (3 Replies)
Hi All
I have recently had to start using Unix for work and I have hit brick wall with this prob....
I have a file that goes a little something like this....
EUR;EUR;EUR:USD:USD;USD;;;EUR/USD;XAU/AUD;XAU/EUR;XAU/AUD,GBP/BOB,UAD/XAU;;;1.11;2.22;3.33;4.44;5.55;6.66;;;
is it possible to... (7 Replies)
Hi ,
I have a set of files in a folder which i need to cut in to two parts....
Sample files
touch AE_JUNFOR_2014_MTD_2013-05-30-03-30-02.TXT
touch AE_JUNFOR_2014_YTD_2013-05-30-03-30-02.TXT
touch temp_AE_JUNFOR_2014_MTD_2013-05-30-03-30-02.TXT
touch... (4 Replies)
Hi All,
I have a string with , delimiter
america,finland,netherlands
Now i want these values to be stored in file as below with newline character at end of each value
america
finland
netherlands
Regards
Prasad (3 Replies)
I am trying to remove columns 81-97 from a line that can be as long as 114 characters. Because a number of lines might not have under 80 characters, using the cut command following by paste could be a problem. While sed might work, is there some other utility that could do this more easily?
... (9 Replies)
Discussion started by: wbport
9 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)