[HPADM] $1, $2, $3, GO!

From: Bellows, Bambi (bbellows@usg.com)
Date: Thu Jan 26 2006 - 19:47:34 EST


Hi Scott!

Hi Folks!

We are running these scripts with flags that are evaluated by getopts.
The problem is that the arguments on the command line are saved to the
environment as $1, $2, $3, etc., such that when the next script is
called, if it is called without parameters, $1, $2, $3 (etc) are still
in the environment and their values are evaluated by getopts. I cannot
see any way to clear out these variables. Here's the example:

lxcndb01:bbellows$ . setenv.ksh -ets11 -aappl -coa
Setting Environment...
Environment Set - Tech Support Oracle Applications
lxcndb01:bbellows$ echo $1 $2 $3
-ets11 -aappl -coa
lxcndb01:bbellows$ unset 1
ksh: 1: is not an identifier
lxcndb01:bbellows$ 1=""
ksh: 1=: not found
lxcndb01:bbellows$ $1=""
ksh: -ets11=: not found

I appreciate your help on this...
Thanks,
Bambi.

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:51 EDT