Sponsored Content
Full Discussion: using getopts
Operating Systems HP-UX using getopts Post 302305850 by vidyadhar85 on Friday 10th of April 2009 12:14:32 AM
Old 04-10-2009
it depends weather the passed parameter is handled in called program or not.. please post the programs that will help us to provide better ans
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

getopts

I have a script that facillitates NDM (Connect::\Direct) transfer to remote hosts. This script uses getopts to parse through the parameters passed to it and to set appropriate variables based upon what was passed in. Kickoff="mv $PATH/$FILE1 $PATH/$FILE2" ndm_shell.ksh -p $Node -s $Source -d... (3 Replies)
Discussion started by: google
3 Replies

2. Shell Programming and Scripting

Help in getopts

Hi, My script will take a input file as a parameter(which is not mandatory) and also an option. ksh my_script.sh <inputfile> The option -n I have given is no way related to the input file. Now the problem here is when i execute the script specifying the input file and the option(the way... (4 Replies)
Discussion started by: chella
4 Replies

3. Shell Programming and Scripting

Using getopts

I am having some trouble/questions with getopts that I can't find any solid info on with google I need it to parse things of the syntax of: -r # # # -f -c with as many repeats as possible, and it should catch erroneous commands also, but continue going... my first question is, -r... (3 Replies)
Discussion started by: TurboArkhan
3 Replies

4. Shell Programming and Scripting

using getopts

Hi, I have a program where I want to use getopts. I want to use "-i" option and then optionally supply arguments. If user dosent supply arguments, then also it should work. Please tell me how to proceed. Here is some code, this is not right code btw but a sample to understand what I want to... (1 Reply)
Discussion started by: som.nitk
1 Replies

5. UNIX for Dummies Questions & Answers

Getopts

Hey, i need help with the use of getopts in shell script. tried reading a lot online, but found incomplete examples (maybe complete but cudn't make out). PLzz help...explain in deatil plzzz, i am a newbie:confused: (3 Replies)
Discussion started by: SasankaBITS
3 Replies

6. Shell Programming and Scripting

getopts help

First off, I apologize for my lack of knowledge. I realize my problem will probably seem pretty basic to everyone, but I've been at this for several hours now and I've gotten nowhere. I would contact my professor, but it is too late for that. Anyway, I'm trying to write a function called... (1 Reply)
Discussion started by: Unknown50862
1 Replies

7. Shell Programming and Scripting

Using getopts. Need help

Hi all... I have been looking on here for the past few days for an answer and Im gonna have to break down and ask. I just learned about the getopts command last week so have been trying to utilize it in my scripts. Below, I am trying to set up a case structure for options using getopts.... (1 Reply)
Discussion started by: losingit
1 Replies

8. UNIX for Dummies Questions & Answers

Getopts

while getopts v OPTION do case $OPTION in v) echo "Hello" ;; *) exit 1;; esac done Suppose I have script tmp.sh Whose Signature is tmp.sh <fixed_argument> When I run the script with tmp.sh -v "file", it echoes a hello but, when I try the other way i.e, tmp.sh... (1 Reply)
Discussion started by: Devendra Hupri
1 Replies

9. Shell Programming and Scripting

Getopts help

Hi All, I am writing a script to pass the getopts argument to the function which I have. But it as soon as I execute the script, the argument is taking it as blank. I tried using multiple way to check but its not working. Can someone please let me know what wrong in this code. function1()... (4 Replies)
Discussion started by: sidh_arth85
4 Replies

10. Shell Programming and Scripting

Using getopts

Hi. Can somebody please show me an example of how to use getopts to assign a variable if it's been passed into the script but to set a default if no value has been passed in? And also how to handle a param with multiple values ... so a sub parse (can I use a function for this?)? Here's my code... (1 Reply)
Discussion started by: user052009
1 Replies
slp_syntax(7)						 Miscellaneous Information Manual					     slp_syntax(7)

NAME
slp_syntax - SLP Service Type Syntax DESCRIPTION
The SLP API expects service type information to be passed while querying for SLP service information and also while registering and dereg- istering services. The SLP API accepts service type information in URL format also. The service type string contains the following information. Name of the service type. Naming Authority responsible for the service name. The service type string is of the form: The abstract-type is a short descriptive string that describes the type of service. The naming-authority is the name of the organization that named the service. The naming-authority is optional, but if it is omitted, then IANA is assumed to be the naming authority and IANA requires service-types to be registered (see RFC 2609). concrete-type, also optional, is a kind of sub-type of the abstract-type. For example, is an abstract type (owned by IANA) and is a concrete type (owned by IANA). The official definition of Service Type strings can be found in RFC 2609, "Service Templates and Service Schemes". Examples of Service Type Strings A (fictitious) weather service type owned by NASA that uses WTP protocol. A (fictitious) weather service type owned by NASA that uses SWTP protocol. A chat service type owned by SuperChat. A samba printer service type. An IANA ftp service type. An IANA telnet service type. Comparing Service Types Since service types are important in determining the URLs that are returned by the call, you should understand how services are compared. Suppose that three services were registered with using a srvtype of and If a client program calls with a srvtype of the urls for both and are returned is not). However, if is called with srvtype of or then the urls for or would be returned. In other words, if a concrete-type is used, only services with the same abstract and concrete-type are returned. If only the abstract type is used, then all services of that abstract type (and naming authority) are returned. SLP Service URL Syntax SLP APIs accept service type strings in URL syntax format. URL strings are passed as parameters to and functions and returned as a result to the callback function. SLP defines a special type of URL called a Service URL that MUST be used when calling SLP API functions. The syntax of a service URL is: service-type is a service type as explained above. addrspec can be any address that fits URL syntax and can be translated as a network location. The and strings are required. Service URL Examples SLP requires you to use Service URLs. API functions will return if you do not. Service URLs are required because the SLP API designers do not allow the service-type to be passed in as a parameter to the call. Without the service-type, does not allow the caller to distinguish between services of varying types that were registered with the same standard URL. The function expects the search strings to be passed in LDAPv3 Search Filter Syntax. SEE ALSO
slpd(1M), libslp(3N), slp.reg(4). slp_syntax(7)
All times are GMT -4. The time now is 09:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy