Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!snorkelwacker!paperboy!husc6!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.unix.questions Subject: Re: Can you access command line args from a source'd script? Message-ID: <9228:Aug2421:27:1090@kramden.acf.nyu.edu> Date: 24 Aug 90 21:27:10 GMT References: <1990Aug24.191615.27944@usenet.ins.cwru.edu> Distribution: usa Organization: IR Lines: 13 In article <1990Aug24.191615.27944@usenet.ins.cwru.edu> boysko@dsrgsun.CES.CWRU.Edu (Glenn Boysko) writes: > Is it possible to get the filename of a sourced file (either Csh or Sh) while > the file is being sourced? Not easily. There is, however, a useful trick in the other direction: If you start a script with #!/bin/echo sorry,try:source then someone who executes it without typing ``source'' will be warned what to do. This makes a convenient wrapper for tset-type programs. ---Dan