Difference between revisions of "Dirname"

From wikieduonline
Jump to navigation Jump to search
 
Line 14: Line 14:
 
* <code>[[mkdir -p]] "$(dirname "$1")" && [[touch]] "$1"</code>
 
* <code>[[mkdir -p]] "$(dirname "$1")" && [[touch]] "$1"</code>
 
* <code>[[BASH_SOURCE]]</code>
 
* <code>[[BASH_SOURCE]]</code>
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
+
* <code>script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 10:12, 28 March 2024

Advertising: