Difference between revisions of "Dirname"

From wikieduonline
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
<code>dirname</code> command included in <code>[[coreutils]]</code> package.
+
<code>dirname</code> <ref> https://man7.org/linux/man-pages/man1/dirname.1.html</ref> command included in <code>[[coreutils]]</code> package.
* https://man7.org/linux/man-pages/man1/dirname.1.html
 
  
 
  [[cd]] -- "$(dirname "$0")"
 
  [[cd]] -- "$(dirname "$0")"
Line 15: 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: