Jump to content

Bash (Unix shell): Difference between revisions

No edit summary
Line 149: Line 149:
#!/bin/bash
#!/bin/bash
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
cd "${DIR}" || exit
cd "${DIR}" || exit 1
</syntaxhighlight>
</syntaxhighlight>