Try this corrected version, which is based on your own attempts:
If it works, please use the while loop version, which is more appropriate for this task. It does the same as the for loop, but in a "cleaner" way:
This User Gave Thanks to junior-helper For This Post:
Hello
I want to set the password for user never expire through the command line. For your information the box is running under Solaris 8 platform. (2 Replies)
We have a Solaris box. I noticed that whenever any non-root user logins into the box and issues the command id the output is (for example) uid=42568(sam) gid=1245(sam) euid=0(root) egid=2(bin). I have not given any privileges to anyone explicitly. When I issued ls -l in the /usr/bin directory I... (1 Reply)
Hi All,
Is this true on chage command?
-M, MAX_DAYS
Passing the number -1 as MAX_DAYS will remove checking a password's validity.
Does this means password will not expire anymore?
Thanks for any comment you may add. (0 Replies)
I am testing a script and need to change the system date to Nov 30 2009. I cannot seem to find a way to do this other than TZ command but it does not seem to work correctly.
I tried TZ=GMT+168 date but it is returning todays date
Mon Dec 7 19:48:11 GMT 2009
...instead of Nov 30 2009
I... (4 Replies)
Hi,
If User1, User2 and User3 are in the same group. User1 should not be able to view the files of User2 and User3. But User2 and User3 should be able to view all files.
How to set permission for this.
Please help.
Thanks,
Priya. (1 Reply)
Scenario: Admin wants to grant user temporary access to sudo that will expire on an arbitrary date\day. Say, after 10 days, sudo rights disappear automatically.
I'm sure there's a way to hack something together with a script or cron job, but I was wondering if anyone has a package \ tool \ other... (3 Replies)
Hi,
I have a requirement where in i need to write a shell script to set users password to never expire. I know the command which is used to perform the same .. which is chage command.
But, could not figure out how to do the same in shell script.
Could you please help me with the shell... (3 Replies)
Hi! All,
I am trying to reset the date and time since the change in time over the weekend. I cannot issue the command date -t 201703131330.
The system gives me an error invalid option.
This happens on my SCO OpenServer 5.0.7 and 5.0.6. Do anyone have an idea why? I even tried using... (6 Replies)
i try to set linux date & time in specific format but it keep giving me error
Example :
date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
or
date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
keep giving me this error :
date: invalid date ‘19-01-2017 00:05:01'
Please use CODE tags... (7 Replies)
Discussion started by: umen
7 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)