home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sun4nl!orcenl!rgasch
- From: rgasch@nl.oracle.com (Robert Gasch)
- Newsgroups: comp.unix.shell
- Subject: Parameter Passing
- Message-ID: <2676@nlsun1.oracle.nl>
- Date: 14 Aug 92 13:48:48 GMT
- Organization: Oracle Europe
- Lines: 18
-
- I have written a shell script which accepts one parameter. The first
- thing it does after making sure that it is /bin/sh and not some
- other shell is check if the parameters are OK.
- If I call it as
- ap STRING_ARG
- sh ap STRING_ARG
- everything is fine. The parameter is recognized and life is great.
-
- Here comes the confusion: As soon as I call it as
- . ap STRING_ARG
- the parameter is not recognized anymore. Even supplying it with
- 2 or more parameters does not change the fact that $# is equal to 0.
-
- Could some kind soul out there explain what is going on and why
- I get these strange reactions.
-
- Thanks a lot
- --> Rob
-