File Name Handling in bash: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * bash") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=Internal= | =Internal= | ||
* [[bash# | * [[bash#Subjects|bash]] | ||
=Absolute Path for a File= | |||
==Absolute Path for the Current Script== | |||
<syntaxhighlight lang="bash"> | |||
local dir=$(cd $(dirname $0)/..; pwd) | |||
basename ${dir} | |||
</syntaxhighlight> |
Latest revision as of 23:39, 11 May 2018
Internal
Absolute Path for a File
Absolute Path for the Current Script
local dir=$(cd $(dirname $0)/..; pwd)
basename ${dir}