Sponsored Content
Full Discussion: double-dash options
Top Forums Shell Programming and Scripting double-dash options Post 302102486 by dhinge on Wednesday 10th of January 2007 09:09:15 PM
Old 01-10-2007
double-dash options

I need to create a file that accepts arguments and options, and the options have to allow for single-dash options (-abc) and double-dash options (--help). What is the best way to do this? Getopt(s) is great for single-dash, but chokes on double-dash. Do I really need to save the arguments to a file, and use grep?
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

dash after ampersant

Hi! I'm new in these forums and more or less new with Unix. So... here is the question: does anyone know where is redirected the output of a command when you put >&- after it? Does it means any standard file descriptor? Thanks! (2 Replies)
Discussion started by: csecnarf
2 Replies

2. UNIX for Dummies Questions & Answers

ignoring a dash in file name

so i have a simple file called -x and i need it renamed to x now i dont understand why when using the most basic methods, only the code mv ./-x x changes the file name while using any other type of escape characters around the dash, such as single/double quotations or backslash, doesnt. ... (5 Replies)
Discussion started by: LumpSum
5 Replies

3. UNIX for Dummies Questions & Answers

awk to seperate a string that has a dash

Hello I have this string XYZ-ABC DFT-ERT QWE-TYU I want to get the part after the dash. how to do that? thanks (2 Replies)
Discussion started by: melanie_pfefer
2 Replies

4. Shell Programming and Scripting

remove dash

hi I am using ksh #A="abc-def" #typeset -u B="$A" #echo $B ABC-DEF how to remove the dash? i.e. ABCDEF? thank you (1 Reply)
Discussion started by: melanie_pfefer
1 Replies

5. Shell Programming and Scripting

Extracting string before first dash in a file name

Hi all, Given a file name such as EXAMPLE=lastname-02.30.71-firstname-town-other.tar.gz How do I print everything before the first dash (i.e. lastname) Note: I do not know exactly how many dashes or what information there will be in each file name so it is important that the code... (2 Replies)
Discussion started by: bashnewbee
2 Replies

6. Shell Programming and Scripting

Exclude dash in grep

Hi, I must be overlooking something, but I don't understand why this doesn't work. I'm trying to grep on a date, excluding all the lines starting with a dash: testfile: #2013-12-31 2013-12-31code: grep '^2013-12-31' testfileI'm expecting to see just the second line '2013-12-31' but I don't... (3 Replies)
Discussion started by: Subbeh
3 Replies

7. Shell Programming and Scripting

A dash to GOTO or a dash from GOTO, that is the question...

Well, guys I saw a question about GOTO for Python. So this gave me the inspiration to attempt a GOTO function for 'dash', (bash and ksh too). Machine: MBP OSX 10.14.3, default bash terminal, calling '#!/usr/local/bin/dash'... This is purely a fun project to see if it is possible in PURE... (3 Replies)
Discussion started by: wisecracker
3 Replies
asadmin-create-jvm-options(1AS) 				   User Commands				   asadmin-create-jvm-options(1AS)

NAME
asadmin-create-jvm-options, create-jvm-options - creates the JVM options from the Java configuration or profiler elements SYNOPSIS
create-jvm-options --user admin_user [--password admin_password][--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename] [--terse=false] [--echo=false] [--interactive=true] [--profiler=false ](jvm_option_name=jvm_option_value)[:jvm_option_name=jvm_option_value]* Creates the JVM options in the Java configuration or Profiler elements of the domain.xml file. You can enter more than one JVM option sepa- rated by a colon (:) . If the JVM option starts with a dash (-) then use two dashes (--) before the operand to distinguish that JVM option is an operand and not an option. JVM options are used to record the settings needed to get a particular profiler going. You must restart the server for the newly created JVM options to take affect. Use the start-domain command to restart the server domain. OPTIONS
--user authorized domain application server administrative username. --password password to administer the domain application server. --host machine name where the domain application server is running. --port port number of the domain application server listening for administration requests. --secure if true, uses SSL/TLS to communicate with the domain application server. --passwordfile file containing the domain application server password. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. Default is false. --echo setting to true will echo the command line statement on the standard output. Default is false. --interactive if set to true (default), only the required password options are prompted. --profiler indicates if the JVM options is for the profiler. Profiler must exist for this option to be true. OPERANDS
jvm_option_name=jvm_optithevleft side of the equal sign (=) is the JVM option name. The right side of the equal sign (=) is the jvm_option_value. Additionally, you can use ":" as a delimiter for more than one jvm-option. If the jvm-option contains a ":", use the escape character to offset the ":" delimiter. Example 1: Using create-jvm-options asadmin> create-jvm-options --user admin --password adminadmin --host localhost --port 4848 --profiler=false --DDebug=true:"-Xmx256m":" -Dcom.sun.aas.imqBin"="/export/as7se/imq/bin" Command create-jvm-options executed successfully Where the JVM options are created. The double dash (--) is used between --profiler options and the operand because - indicated the end of the options and the following text is the operand. The double dash (--) is necessary here since there are single dashes (i.e., --DDebug) in the operand. To distinguish between the options and the operand, the double dash (--) is used. EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-delete-jvm-options(1AS) J2EE 1.4 SDK March 2004 asadmin-create-jvm-options(1AS)
All times are GMT -4. The time now is 08:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy