get path in bash

When running a bash shell you might want to find files and directories relative to the path of the script. The use of 'pwd' in this case can lead to problems if the script has been run from another directory. What you need is the absolute path of the script being executed. Here's an example of how to do it. This works on most Linuxes but unfortunately is not supported on Mac OSX.


Popular posts from this blog

Selenium IDE Flow Control - Goto and While Loops

REST API Best Practices 4: Collections, Resources and Identifiers

REST API Best Practices 3: Partial Updates - PATCH vs PUT