Path: utzoo!attcan!uunet!lll-winken!lll-tis!mordor!joyce!sri-unix!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.unix.questions Subject: Re: changing dir inside shell Message-ID: <205@quintus.UUCP> Date: 28 Jul 88 04:04:29 GMT References: <16654@brl-adm.ARPA> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Organization: Quintus Computer Systems, Inc. Lines: 12 In article <16654@brl-adm.ARPA> rbj@nav.icst.nbs.gov (Root Boy Jim) writes: ... >1) If `sh' or `ksh' is your parent shell, type ". mover". > You may also use shell functions, or even aliases if you prefer. ... >Note that sourcing a file is less flexible, as you cannot pass any >parameters ($1, $2, etc) to it. With shell functions and aliases you can. You can pass parameters to a sourced file using named variables. E.g. suppose file "demo" contains echo $arg1 and you do arg1=example . demo