Ticket #43 (new enhancement)
op Feature request: Optional Parameters
| Reported by: | athomas | Owned by: | athomas |
|---|---|---|---|
| Priority: | major | Component: | op |
| Severity: | normal | Keywords: | |
| Cc: |
Description
We would like to be able to specify that a command could have 1 or 2 parameters.
For example, this configuration requires that 2 parameters be specified:
prtvtoc /usr/sbin/prtvtoc $1 $2;
This one won't allow a second parameter:
prtvtoc /usr/sbin/prtvtoc $1;
I'd like to be able to allow users to specify either 1 or 2 parameters. e.g. the following should both be acceptable:
- prtvtoc /dev/rdsk/c1t0d0s2
- prtvtoc -h /dev/rdsk/c1t0d0s2
Perhaps with a syntax like this:
prtvtoc /usr/sbin/prtvtoc $1 $2?;
or this:
prtvtoc /usr/sbin/prtvtoc $1 [$2];
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
