Can you access command line args from a source'd script?

BURNS,JIM gt0178a at prism.gatech.EDU
Wed Aug 29 10:47:42 AEST 1990


in article <801 at travis.csd.harris.com>, brad at SSD.CSD.HARRIS.COM (Brad Appleton) says:
> 	alias mycmd "set my_argv = ( \!* ); source myfile"
> 
> 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.

Just enclose your alias' 2nd parameter in '( and )', ala:

alias mycmd '( set my_argv = ( \!* ); source myfile )'

and you will run in a subshell.
-- 
BURNS,JIM
Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332
uucp:	  ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a
Internet: gt0178a at prism.gatech.edu



More information about the Comp.unix.questions mailing list