File Name Handling in bash

From NovaOrdis Knowledge Base
Revision as of 23:39, 11 May 2018 by Ovidiu (talk | contribs) (→‎Absolute Path for a File)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Internal

Absolute Path for a File

Absolute Path for the Current Script

local dir=$(cd $(dirname $0)/..; pwd)
basename ${dir}