04-03-2006 11:01 PM
with the command "set" i can set serveral options like "set -x, set -a" and so on.
i have a difficult application and i want
to debug some steps. i want to know , which
options are used by "set". with command "env" , i can't see the settings. for example, in ORACLE-SQLPLUS , i can use the command "show all" and i can see the settings.
04-03-2006 11:26 PM
when you set environments in an application you can display them with
Put it in your program to check the current settings of the variable
04-03-2006 11:50 PM
just type "set" alone, it will display all currently set variables.
Addition stuff on shell programming in "Shells: User's Guide: HP 9000 Computers"
part III is for ksh.
04-05-2006 06:07 AM
if you mean the value of options you have set with the set-command: Try
The variable '-' collect all the 'set'-flags, so:
(i -> interactive shell)
04-05-2006 07:01 AM
To see the exported variable which will be passed onto a script or process, tpye the command:
Since set is for the local environment, things like set -x will not apply to a script that you run normally. To trace a script, you can eithee run it with the -x option as in:
sh -x ./myscript
or add set -x to the beginning of your script. Note that in a script, functions are like new scripts so they don't inherit the -x option, so you'll have to add it to your functions.
Note that all the flags for set options are found in the variable $- where if the option has been set, the letter appears and if not set, the letter is missing. So,
means set -i -n -u and -m are all set and all others are reset.