Sponsored Content
Top Forums Shell Programming and Scripting [Perl] Command option with optional value. Post 302885688 by Don Cragun on Tuesday 28th of January 2014 02:56:51 AM
Old 01-28-2014
The best way to do this is to not do this. As you have seen, optional option arguments lead to ambiguous command lines. The only time you can reliably parse them is if they are the last option on the command line and there are no operands.

In VERY specific cases, you can look at an option argument and know that it is an invalid option argument (and in that case use the default), but a typo on a command line in that case can lead to unexpected (and frequently hard to debug) behavior.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

option for ls command

i'm using SunOS 5.7 and I know theres a ls option for seeing what kind of files are in a directory. I was wondering if there was a ls option that could see if the files are txt or files that can be opened in vi (1 Reply)
Discussion started by: eloquent99
1 Replies

2. Solaris

Why does the 'ps' command with -u option not working?

How can I use the 'ps' command to view current sessions but only for a given process/user, with the -u parm? In older versions of Unix, this used to work, but not in Sun Solaris. Thanks (4 Replies)
Discussion started by: ElCaito
4 Replies

3. Shell Programming and Scripting

run a perl with option

I have a perl script which runs and send out e-mail if duplicates are found. I would like to run the with option (like -e) so that it will produce the out put only and will not send out e-mail. How can I achieve it. I would appreciate the help. Thanks. Example: ./file1 (sends out e-mail)... (5 Replies)
Discussion started by: amir07
5 Replies

4. HP-UX

who command option not working

Running HP 11.31 on a HP3600. But when I log in as a user the who command works but if I use an option like "who -m" I get nothing. Any thoughts on what is causing this problem. (11 Replies)
Discussion started by: KMRWHUNTER
11 Replies

5. Shell Programming and Scripting

-n option with grep command

Hi, what is the meaning of -n option before the grep command ? grep command searches for the specified string in the file tmp_crontab.txt but what does -n mean ? With Regards (1 Reply)
Discussion started by: milink
1 Replies

6. Shell Programming and Scripting

perl script command line option driven script

could someone show me a sample command line option driven script? i want to see an easy way to write one and how i can execute it using command line options such as typing in read.pl -i <id> -c <cmds> -s <start> -e <end> would read out all the commands run by ID . from start time to... (7 Replies)
Discussion started by: kpddong
7 Replies

7. Shell Programming and Scripting

How to use a variable as a command option?

I am just learning shell scripting and already I found out I have the bad habit of thinking that it is similar to php or c. I learned some basics and now encountered this problem: On shell it is possible to type: $ date --date="2009-10-10 09:08:34" Sat Oct 10 09:08:34 CEST 2009 ... (2 Replies)
Discussion started by: quinestor
2 Replies

8. Solaris

Fsck command without any option

Dear all, I want to execute fsck command,can i execute fsck command without any option asking for more confidence. Thanks and Regards Monoj Das (1 Reply)
Discussion started by: monojcool
1 Replies

9. Shell Programming and Scripting

Perl debuggin option

I am getting out of memory issue in perl. I need to debug which function taking more memory constraints. what the commands to find out the memory consuming in the perl program. (1 Reply)
Discussion started by: ramkumar15
1 Replies

10. Shell Programming and Scripting

Perl command line option '-n','-p' and multiple files: can it know a file name of a printed line?

I am looking for help in processing of those options: '-n' or '-p' I understand what they do and how to use them. But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.) I did try it and -n works on 2 files. Question is: - is it possible to... (6 Replies)
Discussion started by: alex_5161
6 Replies
remove mapping(1m)														remove mapping(1m)

NAME
remove mapping - Removes specified elements from the local endpoint map SYNOPSIS
rpccp remove mapping -b string-binding -i interface-identifier [-o object-uuid] OPTIONS
Specifies a string representation of a binding over which the server can receive remote procedure calls. At least one binding is required. The value has the form of an RPC string binding, without an object UUID, for example: -b ncadg_ip_udp:63.0.2.17[5347] Note that depending on your system, string binding delimiters such as brackets ([ ]) may need to be preceded by an escape symbol () or placed within quotation marks (' ' or `` ''). Requirements vary from system to system, and you must conform to the usage rules of a system. Specifies an interface identifier to remove from the local endpoint map. An interface identifier is required. Only one interface can be removed in a single oper- ation. The interface identifier has the following form: interface-uuid,major-version.minor-version The UUID is a hexadecimal string and the version numbers are decimal strings, for example: -i ec1eeb60-5943-11c9-a309-08002b102989,1.1 Leading zeros in version numbers are ignored. Defines an object UUID that further determines the endpoint map elements that are removed (optional). Each remove mapping com- mand accepts up to 32 -o options. The UUID is a hexadecimal string, for example: -o 3c6b8f60-5945-11c9-a236-08002b102989 DESCRIPTION
The remove mapping command removes server address information from the local endpoint map. Each element in the local endpoint map logi- cally contains the following: Interface ID, consisting of an interface UUID and versions (major and minor) Binding information Object UUID (optional) Annotation (optional) This command requires one interface identifier (the -i option); at least one string binding (the -b option); and optionally, one or more object UUIDs (the -o option). Each instance of the command accepts from 1 to 32 -b options and from 0 to 32 -o options. The options work together to delimit the elements to be removed from the target endpoint map. The command removes any map element that contains the speci- fied interface identifier, a specified string binding, and a specified object UUID (if any). NOTE
This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE. EXAMPLES
The following command operates from the system prompt to remove a map element from the local endpoint map. The command removes only the map element that contains the specified interface identifier, server address (specified as a string binding), and object UUID. $ rpccp remove mapping > -i ec1eeb60-5943-11c9-a309-08002b102989,1.1 > -b ncadg_ip_udp:16.20.16.64[3424] > -o 30dbeea0-fb6c-11c9-8eea-08002b0f4528 $ RELATED INFORMATION
Commands: add mapping(1m), show mapping(1m), show server(1m) remove mapping(1m)
All times are GMT -4. The time now is 12:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy