I have a MAIN KSH script which calls several other scripts. I want the scripts that are called to workout dynamiclly where they are located in the file system.
When I use something like dirname $0 in scripts which are called they only return the location where the MAIN script was executed.
This needs to work for Solaris, AIX and Linux (preferably in the KSH shell)
Thanks in advance and please do ask questions.
Start Free Trial