Can you access command line args from a source'd script?
Dan Bernstein
brnstnd at kramden.acf.nyu.edu
Sat Aug 25 07:27:10 AEST 1990
In article <1990Aug24.191615.27944 at usenet.ins.cwru.edu> boysko at 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
More information about the Comp.unix.questions
mailing list