Multiple commandline switches


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Multiple commandline switches
# 1  
Old 02-16-2011
Multiple commandline switches

I have a script that has commandline switches that work no problem. But i don't know how to enable it to have multiple switches at one time. So I'd want

Code:
 myscript -h -o

or even
Code:
myscript -ho

but i'm having no luck incorporating this. I tried shifting but i'm not getting it. Thanks

---------- Post updated at 01:10 AM ---------- Previous update was at 12:57 AM ----------

just found getopts...think i found my answer
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Read Strings in as options to switches

I have a script using getops with -a -t -l as potential switches, based on the switches used, it will set the respective variable value which will cause the routine/function to run. I need to also pass a string with the switch that will get parsed by the function. example ./myscript -a... (8 Replies)
Discussion started by: glev2005
8 Replies

2. Shell Programming and Scripting

Checking commandline

mymk target How to check is on commandline or no? Cannot to find out ;( Know that I need to use if.....new in shell sorry Please use code tags next time for your code and data. (2 Replies)
Discussion started by: Manueldo
2 Replies

3. AIX

LACP between AIX 7.1 and HP procurve switches

Hi. On a standalone AIX server, 7.1 version, I have 3 connected gigabit ethernet ports. I made an etherchannel like this : # lsattr -El ent4 adapter_names ent1,ent2 | EtherChannel Adapters True alt_addr 0x000000000000 | Alternate EtherChannel Address True auto_recovery yes | Enable... (1 Reply)
Discussion started by: stephnane
1 Replies

4. Shell Programming and Scripting

echo switches

Hello All, I am writing an shell script but abruptly its not able to recognize switches in echo statement. #!/bin/bash top -n 1 -b>ankit host=`hostname` time=`cat ankit|grep load|tr -s " "|cut -d " " -f3` load=`cat ankit|grep load|tr -s " "|cut -d "," -f4|cut -d ":" -f2` ... (3 Replies)
Discussion started by: ajaincv
3 Replies

5. Infrastructure Monitoring

Nagios monitoring for switches.

Hi, I have configured check_snmp plugin and using the plugin i am able to monitor the uptime of the switch. But the following fails # /usr/local/nagios/libexec/check_snmp -H 10.10.10.1 -C ready -o ifOperStatus.1 -r 1 -m RFC1213-MIB SNMP CRITICAL - *down(2)* | # Any suggestions ? (1 Reply)
Discussion started by: uxadmin007
1 Replies

6. Shell Programming and Scripting

Using curl in commandline

Hi, I am using curl to hit a url using http in solaris 10 using commandline, I want to transfer an attachment(using multipart curl -F) also as a part of the request. If anyone has used kindly help me with the syntax. I am using below command: /usr/local/bin/curl -v... (1 Reply)
Discussion started by: manishmaha
1 Replies

7. Shell Programming and Scripting

Collect information from switches

Hi All , In my environment we have 12 SAN switches .Culd u pls help me for below queries . would like to telnet to all switches and collect information in daily basis with "switchstatus" command and store the output under /tmp/ folder on systemA . To keep passwords of 12switches in a... (1 Reply)
Discussion started by: chinni-script
1 Replies

8. Programming

Signal Handling and Context Switches

Hi guys, this is my first posting, so at first hi to everyone! ;) I have a problem with ucontext_t in connection with signal handling. I want to simulate a preemptive scheduler. I am using the iTimer with ITIMER_PROF, to schedule the interrupts. You find the code below: #include <stdio.h>... (18 Replies)
Discussion started by: XComp
18 Replies

9. UNIX for Advanced & Expert Users

Tar switches!!!

Hi, If i want to write my data on several tapes, (more than one tape), what switch(s) i need to use with tar. In other word if my data needs the sapce more than one tape & i don't wanna to compress or ... my data. so is it possible to write up to the end of the tape & it asks to put another... (1 Reply)
Discussion started by: nikk
1 Replies
Login or Register to Ask a Question
PMK(1)							    BSD General Commands Manual 						    PMK(1)

NAME
pmk -- configuring tool SYNOPSIS
pmk [-hlv] [-b path] [-d switch_disable_list] [-e switch_enable_list] [-f file] [-o file] [options] DESCRIPTION
pmk is a configuring tool which aims to help building project on different operating systems. The options are as follows: -b path Use given path as basedir. -d switch_disable_list Provide a list of switches to disable. -e switch_enable_list Provide a list of switches to enable. -f file Use an alternate file instead of pmkfile(5). -h Display usage. -l Enable check build log. -o file Override pmk.conf data with the content of the given file. -v Display the version number. FILES
pmkfile pmk(1) specification file. /etc/pmk/pmk.conf default pmk(1) configuration file EXAMPLES
To display pmk version number: $ pmk -v To use src as the basedir and disable two switches: $ pmk -b src -d use_gtk,use_qt To specify an alternate pmkfile(5), enabling one switch and overriding /etc/pmk/pmk.conf with the content of a given file ( pmk/pmkovr in this case): $ pmk -f pmk/pmkfile -e use_curses -o pmk/pmkovr SEE ALSO
make(1), pmkscan(1), pmkfile(5), pmk.conf(5), pmksetup(8) HISTORY
The idea to replace configure script was existing since a long time. But the projet was initiated in the begining of March 2003. AUTHOR
Damien Couderc. BUGS
You have to find them. BSD
March 28, 2003 BSD