Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

opts(3form) [opensolaris man page]

opts(3FORM)															       opts(3FORM)

NAME
form_opts - set and get form options SYNOPSIS
#include <form.h> int set_form_opts(FORM *form, Field_Options opts); int form_opts_on(FORM *form, Field_Options opts); int form_opts_off(FORM *form, Field_Options opts); Field_Options form_opts(const FORM *form); DESCRIPTION
The function set_form_opts sets all the given form's option bits (form option bits may be logically-OR'ed together). The function form_opts_on turns on the given option bits, and leaves others alone. The function form_opts_off turns off the given option bits, and leaves others alone. The function form_opts returns the form's current option bits. The following options are defined (all are on by default): O_NL_OVERLOAD Overload the REQ_NEW_LINE forms driver request so that calling it at the end of a field goes to the next field. O_BS_OVERLOAD Overload the REQ_DEL_PREV forms driver request so that calling it at the beginning of a field goes to the previous field. RETURN VALUE
Except for form_opts, each routine returns one of the following: E_OK The routine succeeded. E_SYSTEM_ERROR System error occurred (see errno). SEE ALSO
ncurses(3NCURSES), form(3FORM). NOTES
The header file <form.h> automatically includes the header file <curses.h>. PORTABILITY
These routines emulate the System V forms library. They were not supported on Version 7 or BSD versions. AUTHORS
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. opts(3FORM)

Check Out this Related Man Page

opts(3FORM)															       opts(3FORM)

NAME
form_opts - set and get form options SYNOPSIS
#include <form.h> int set_form_opts(FORM *form, Field_Options opts); int form_opts_on(FORM *form, Field_Options opts); int form_opts_off(FORM *form, Field_Options opts); Field_Options form_opts(const FORM *form); DESCRIPTION
The function set_form_opts sets all the given form's option bits (form option bits may be logically-OR'ed together). The function form_opts_on turns on the given option bits, and leaves others alone. The function form_opts_off turns off the given option bits, and leaves others alone. The function form_opts returns the form's current option bits. The following options are defined (all are on by default): O_NL_OVERLOAD Overload the REQ_NEW_LINE forms driver request so that calling it at the end of a field goes to the next field. O_BS_OVERLOAD Overload the REQ_DEL_PREV forms driver request so that calling it at the beginning of a field goes to the previous field. RETURN VALUE
Except for form_opts, each routine returns one of the following: E_OK The routine succeeded. E_SYSTEM_ERROR System error occurred (see errno). SEE ALSO
ncurses(3NCURSES), form(3FORM). NOTES
The header file <form.h> automatically includes the header file <curses.h>. PORTABILITY
These routines emulate the System V forms library. They were not supported on Version 7 or BSD versions. AUTHORS
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. opts(3FORM)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

getopts standard approach - does one exist?

Hi, I've just been looking through all the getopts related posts and there appear to be many different approaches to reading a command and its options in and checking for errors. However, the only one I can get to work is as follows: while getopts :fvriR opt do case $opt in f) echo "f";;... (8 Replies)
Discussion started by: dkieran
8 Replies

2. UNIX for Advanced & Expert Users

getopts problem

i was going through the man page of getopts this particular section is not clear to me can anyone please clarify in a little detail so that i can understand the concept MANPAGE:: Since getopts affects the current shell execution environ- ment, it is generally provided as a... (7 Replies)
Discussion started by: mobydick
7 Replies

3. Shell Programming and Scripting

getopts : two values to a single argument ?

Hi Gurus I am trying to figure out (with not much success) how to pass two values to a single getopts argument ... for example ./script -a Tuesday sausagesThe $OPTARG variable seems to only get populated with the first argument. What im looking to do is to process the first argument (i.e.make... (6 Replies)
Discussion started by: rethink
6 Replies

4. Shell Programming and Scripting

Please review script for search in all files

I have written a little script to scan users home directories for certain commands located inside a file. The script is setup to include a small help section and allows for passing a username argument to override scanning of all users home directories. A lot of searching and trial and error has... (7 Replies)
Discussion started by: bkeep
7 Replies

5. Shell Programming and Scripting

Help with getopts command

Hello All, I have shell script as below in a.ksh. #! /usr/bin/ksh while getopts a: b: ab:f: VAR do case $VAR in a) A=${OPTARG} echo $A;; b) B=${OPTARG} echo $B;; ab) AB=${OPTARG} echo $AB ;; f) F=${OPTARG} echo $F ;; esac done When I execute sh a.ksh -a 1 -b 2 -ab 3 -f 4 as below... (7 Replies)
Discussion started by: tonsat
7 Replies

6. Homework & Coursework Questions

Problem with calculator script

I'm having some trouble implementing a basic calculator using command line options. The script is supposed to take (multiple) arguments -a,-d,-m,-s for addition, multiplication, division, and subtraction. I'm pretty sure I know how to parse through the options with getopt(), but I have no idea... (17 Replies)
Discussion started by: zkapopou
17 Replies

7. Shell Programming and Scripting

getopts problem

Hi everyone I want to know how can we pass multiple argument in getopts suppose PARAMS="abcd" while getopts ${PARMS} FLAG do case ${FLAG} in (a) (b) (c) (d) esac (6 Replies)
Discussion started by: aishsimplesweet
6 Replies

8. Shell Programming and Scripting

Bypass getopts errors and continue processing?

Is there a way to do this? while getopts "n:g:m:i:p:d:a:" OPTION do case $OPTION in ... if i do a ./script.sh -n john -u user -p password, it will output: name= john ./script.sh: illegal option -- u Is there a way to skip over errors so that -p will get processed as well? By... (7 Replies)
Discussion started by: etranman1
7 Replies

9. Shell Programming and Scripting

Help on getopts in ksh

I am trying to make a Shell Script in KSH on Linux box and Solaris box which takes few arguments... with long options using getopts (not getopt). I have my sample code... at the end I will say my requirement... Please help me folks... $ cat dummy #!/bin/bash # Argument = -t test -r server... (6 Replies)
Discussion started by: explorer007
6 Replies

10. Shell Programming and Scripting

Getopts in the subshell of ksh

Hi, the getopts doesnt seem to be working in the subshell of the ksh. when I echo $@ and $* from the subshell it shows nothing. even when I am capturing the parameters from the outer shell and passing while invoking the file then I am still not getting it properly. the below code is in the... (9 Replies)
Discussion started by: hitmansilentass
9 Replies

11. Shell Programming and Scripting

Getopts how to handle missing '-' in command line args.

I'm using getopts to process command line args in a Bash script. The code looks like this: while getopts ":cfmvhs:t:" option; do case $option in c) operationMode="CHECK" ;; f) operationMode="FAST" ;; m) ... (6 Replies)
Discussion started by: gencon
6 Replies

12. Shell Programming and Scripting

[BASH] Using getopts

Heyas Just recently there was a thread about parsing arguments, where i read the first time about getopts. This said, i'd like to 'provide' a list function that can be 'trigered' using an 'option'(?). The regarding code snippets are: while getopts... (7 Replies)
Discussion started by: sea
7 Replies

13. Shell Programming and Scripting

Getopts - space in argument (OPTARG)

Hi, I want to capture space as well from the argument eg: script.ksh -m "Message from xyz" -e "email@xyz.com" script.ksh -m 'Message from xyz' -e 'email@xyz.com' I am parsing using getopts, but for option "m" OPTARG is returning only "Message". Please use code tags next time for... (9 Replies)
Discussion started by: tostay2003
9 Replies

14. Shell Programming and Scripting

Using getopts for handling multiple options

Hi Guys, I have created a script for our automated DB creation, it works fine with default option(-d). $ ./test_db.ksh -d abc 11 dev -d is Default option ORACLE_SID=abc ORACLE_VERSION=11 ENV_TYPE=dev For creating a customized DB, i thought of giving the user different options.... (8 Replies)
Discussion started by: veeresh_15
8 Replies

15. Shell Programming and Scripting

How-to enforce check on getopts command

here is my script that expects the user to run it like ./best.sh -f /tmp/log.txt more best.sh #!/bin/bash while getopts ":f:" opt; do case $opt in f) file_in="$OPTARG" ;; \?) echo "Invalid option -$OPTARG" >&2 ;; esac done uname -a SunOS mymac 5.11 11.2 sun4v... (15 Replies)
Discussion started by: mohtashims
15 Replies