Sponsored Content
Top Forums Programming Make a file accept only two arguments from the command line Post 302935727 by ProgMan2015 on Wednesday 18th of February 2015 09:12:43 PM
Old 02-18-2015
Question Make a file accept only two arguments from the command line

DELETED

Last edited by ProgMan2015; 02-18-2015 at 10:23 PM.. Reason: Didn't realize there were different spots for homework sorry
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Make new arguments for echo command

Hi everybody, i want to make an argument at echo command that takes a alpharithmetic and returns it reversed. How this can be done? plus what makefile changes are needed (0 Replies)
Discussion started by: Panteras
0 Replies

2. Shell Programming and Scripting

How to read arguments to make command

In the make file update updateq: ------------------- ---------- i want the makefile to display some messages when user gives "make update", but totally quite wehn user enters "make updateq". Can u tell me how to read these argument in makefile. $1 doesnt work:( (3 Replies)
Discussion started by: vikashtulsiyan
3 Replies

3. Homework & Coursework Questions

I need to make a script that has 4 command line arguments to function properly.

I have no idea what the following means. The teacher is too advanced for me to understand fully. We literally went from running a few commands over the last few months to starting shell scripting. I am not a programmer, I am more hardware oriented. I wish I knew what this question was asking... (3 Replies)
Discussion started by: Wookard
3 Replies

4. Homework & Coursework Questions

trouble understanding file option and command line arguments

Hi, I am creating a program with the C language that simulates the WC command in Unix. My program needs to count lines, bytes and words. I have not added the code to count bytes and words yet. I am having trouble understanding what the file option/flag '-' does. I can not visualize how it moves... (1 Reply)
Discussion started by: heywoodfloyd
1 Replies

5. Shell Programming and Scripting

ksh script that will accept arguments

Hi, I am not very skilled using ksh scripts. How do I create a ksh script that will accept arguments and use them in the script ? I need to make this: Run this command with this argument: ./mykshprogram.ksh madsen and sometimes I need to do this: Run the ksh again with 2... (3 Replies)
Discussion started by: hasselhaven
3 Replies

6. UNIX for Dummies Questions & Answers

script unix which accept two arguments

does anyone can help me with this homework, please..I am beginner in linux and I don't how to do it :( Create a script scanner.sh which will accept two arguments: the first argument is the DNS name or the IP address of a system, or a network address or an IP range, the second argument is... (1 Reply)
Discussion started by: gennyy
1 Replies

7. Shell Programming and Scripting

Perl : accept multiple user entered command line arguemnts

I am trying to create a script that will accept multi input from the user (really just me), then execute those command on a remote device. My question is if the I enter "No" at the confirmation point "Are these statements correct y or n ?", what is the best way to go back and start over ? I... (3 Replies)
Discussion started by: popeye
3 Replies

8. Shell Programming and Scripting

How to accept command line argument as character or text if number is entered?

Hello Does the unix korn shell provide a function to convert number entered in command line argument to text or Character so that in next step i will convert Chr to Hex (6 Replies)
Discussion started by: aadityapatel198
6 Replies

9. UNIX for Dummies Questions & Answers

Command - filename as arguments - make executable to all users.

Edit: Sorry. Mistakenly posted - please delete (3 Replies)
Discussion started by: Reddax
3 Replies

10. Homework & Coursework Questions

Make a file accept only two arguments from the command line

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: 1) The script is executed in the Korn shell. 2) Name the shell script file is asg6s. 3) The asg6s file is... (7 Replies)
Discussion started by: ProgMan2015
7 Replies
IMAP::Admin(3pm)					User Contributed Perl Documentation					  IMAP::Admin(3pm)

NAME
Cyrus::IMAP::Admin - Cyrus administrative interface Perl module SYNOPSIS
use Cyrus::IMAP::Admin; my $client = Cyrus::IMAP::Admin->new('mailhost'[, $flags]); $rc = $client->create('user.auser'[, $partition]); $rc = $client->delete('user.auser'); $rc = $client->deleteacl('user.buser', 'user1', 'user2'); %acls = $client->listacl('user.buser'); @mailboxes = $client->list('*'); @mailboxes = $client->list('%', 'user.'); @mailboxes = $client->subscribed('*'); %quota = $client->quota($root); ($root, %quota) = $client->quotaroot($mailbox); $rc = $client->rename($old, $new[, $partition]); $rc = $client->setacl($mailbox, $user =E<gt> $acl[, ...]); $rc = $client->setquota($mailbox, $resource =E<gt> $quota[, ...]); $rc = $client->xfer($mailbox, $server[, $partition]); DESCRIPTION
This module is a Perl interface to Cyrus administrative functions. It is used to implement Cyrus::IMAP::Admin::Shell (otherwise known as cyradm and also available for use in Perl administrative programs. METHODS
Many of the methods have a cyradm-compatible name and a shorter name. The shorter name is shown in the synopsis when it exists; the cyradm-compatible name should be reasonably obvious. In general, methods return undef or empty lists on error. In some cases a method may return an empty list without an error (i.e. "list" of a nonexistent hierarchy), so it may be necessary to check the error state explicitly via the "error" method. new($server[, $flags]) Instantiates a cyradm object. This is in fact an Cyrus::IMAP object with a few additional methods, so all Cyrus::IMAP methods are available if needed. (In particular, you will always want to use the "authenticate" method.) error Return the last error that occurred, or undef if the last operation was successful. This is in some cases (such as "list") the only way to distinguish between a successful return of an empty list and an error return. Calling "error" does not reset the error state, so it is legal to write: @folders = $cyradm->list($spec); print STDERR "Error: ", $cyradm->error if $cyradm->error; createmailbox($mailbox[, $partition]) create($mailbox[, $partition]) Create a new mailbox on the specified or default partition. deletemailbox($mailbox) delete($mailbox) Delete a mailbox. As with cyradm, you will probably need to add the c ACL for yourself to the mailbox with "setaclmailbox" first. deleteaclmailbox($mailbox, $user[, ...]) deleteacl($mailbox, $user[, ...]) Delete one or more ACL from a mailbox. listaclmailbox($mailbox) listacl($mailbox) Returns a hash of mailbox ACLs, with each key being a Cyrus user and the corresponding value being the ACL. listmailbox($pattern[, $reference]) list($pattern[, $reference]) List mailboxes matching the specified pattern, starting from the specified reference. The result is a list; each element is an array containing the mailbox name, attributes, and the separator. (This interface may change.) listsubscribed($pattern[, $reference]) subscribed($pattern[, $reference]) Like "listmailbox" but only shows subscribed mailboxes. listquota($root) quota($root) Returns a hash specifying the quota for the specified quota root. Use "listquotaroot" to find the quota root for a mailbox. listquotaroot($mailbox) quotaroot($mailbox) Returns a list, the first element is the quota root for the mailbox and remaining elements are a hash specifying its quota. renamemailbox($from, $to[, $partition]) rename($from, $to[, $partition]) Renames the specified mailbox, optionally moving it to a different partition. setaclmailbox($mailbox, $user => $acl[, ...]) setacl($mailbox, $user => $acl[, ...]) Set ACLs on a mailbox. The ACL may be one of the special strings "none", "read" ("lrs"), "post" ("lrsp"), "append" ("lrsip"), "write" ("lrswipkxte"), "delete" ("lrxte"), or "all" ("lrswipkxte"), or any combinations of the ACL codes: l Lookup (mailbox is visible to LIST/LSUB, SUBSCRIBE mailbox) r Read (SELECT/EXAMINE the mailbox, perform STATUS) s Seen (set/clear SEEN flag via STORE, also set SEEN flag during APPEND/COPY/FETCH BODY[...]) w Write flags other than SEEN and DELETED i Insert (APPEND, COPY destination) p Post (send mail to mailbox) k Create mailbox (CREATE new sub-mailboxes, parent for new mailbox in RENAME) x Delete mailbox (DELETE mailbox, old mailbox name in RENAME) t Delete messages (set/clear DELETED flag via STORE, also set DELETED flag during APPEND/COPY) e Perform EXPUNGE and expunge as part of CLOSE a Administer (SETACL/DELETEACL/GETACL/LISTRIGHTS) setquota($mailbox, $resource, $quota[, ...]) Set quotas on a mailbox. Note that Cyrus currently only defines one resource, "STORAGE". As defined in RFC 2087, the units are groups of 1024 octets (i.e. Kilobytes) xfermailbox($mailbox, $server[, $partition]) xfer($mailbox, $server[, $partition]) Transfers (relocates) the specified mailbox to a different server. AUTHOR
Brandon S. Allbery, allbery@ece.cmu.edu SEE ALSO
Cyrus::IMAP Cyrus::IMAP::Shell perl(1), cyradm(1), imapd(8). perl v5.14.2 2012-04-19 IMAP::Admin(3pm)
All times are GMT -4. The time now is 06:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy