comp.unix.questions

The Silent Dodo patkar at helium.ecn.purdue.edu
Sat Sep 8 01:23:54 AEST 1990


I have a question about shell scripts.  How can a shell script
(sh or csh) find out its own file name?  Actually, I need to
know only the directory in which it resides.

My shell scripts need, say, some "sed" script files and it is
always nice to keep them in the same directory as the shell
script.  So when I move the shell scripts to a different
directory or a different machine I have to make changes in the
pathname for the sed scripts.  Is there a better way to do
this?

 -- Anant
(patkar at cn.ecn.purdue.edu)



More information about the Comp.unix.questions mailing list