Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!samsung!emory!mephisto!uflorida!travis!brad From: brad@SSD.CSD.HARRIS.COM (Brad Appleton) Newsgroups: comp.unix.questions Subject: Re: Can you access command line args from a source'd script? Summary: Not really, but you can fake it with an alias! Message-ID: <801@travis.csd.harris.com> Date: 27 Aug 90 15:26:53 GMT References: <1990Aug24.191615.27944@usenet.ins.cwru.edu> <9228:Aug2421:27:1090@kramden.acf.nyu.edu> Sender: news@travis.csd.harris.com Distribution: usa Organization: Harris Computers Systems Division, Fort Lauderdale,FL Lines: 14 I had to do this once! What I had to do was create an alias: alias mycmd "set my_argv = ( \!* ); source myfile" then `myfile' could go around using `my_argv' like scripts use $argv; Big drawback to this approach is that you have to be real carefule not to stomp on things in the environment since you are NOT a separate shell. You should probably take care to unset any variables that you used and be REAL careful not to overwrite any pre-existing variables (unless you know what you are doing with the variables in question). ______________________ "And miles to go before I sleep." ______________________ Brad Appleton brad@travis.ssd.csd.harris.com Harris Computer Systems ...!uunet!hcx1!brad Fort Lauderdale, FL USA ~~~~~~~~~~~~~~~~~~~~ Disclaimer: I said it, not my company! ~~~~~~~~~~~~~~~~~~~