Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unix scripting in KSH/ qualified pathname

Status
Not open for further replies.

boghog

Programmer
Jul 22, 2004
1
US
How would you propose to retreive the qualified pathname of the executing script, within the script?

i.e. /usr/bob/myscript

or something of this nature?
Any help or direction would be appreciated
 
Have you tried $0 ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Code:
#!/bin/ksh

thisFile="$(whence ${0})"

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top