File Name Handling in bash: Difference between revisions
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
=Absolute Path for a File= | =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}