Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I get the absolute path to the current script in KornShell?

Tags:

People also ask

How do I run a full path in a script?

When you see ./script being used it telling the shell that the script is located on the same directory you are executing it. To use full path you type sh /home/user/scripts/someScript .

What is absolute path in bash?

A path is a location to a directory or a file. There are two distinct types of paths in Linux – absolute and relative. The relative path is determined using the current working directory. On the other hand, the absolute path is the full path to a file or directory.


Is it possible to find out the full path to the script that is currently executing in KornShell (ksh)?

i.e. if my script is in /opt/scripts/myscript.ksh, can I programmatically inside that script discover /opt/scripts/myscript.ksh ?

Thanks,