Difference between revisions of "Basename"

From wikieduonline
Jump to navigation Jump to search
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{lc}}
 +
[[wikipedia:basename]] <ref>https://man7.org/linux/man-pages/man1/basename.1.html</ref> strip [[directory]] and suffix from filenames
  
[[usage]]
+
basename .
 +
.
  
 
[[Terraform]]
 
[[Terraform]]
 
  locals {
 
  locals {
   name  = "example-${replace(basename([[path.cwd]]), "_", "-")}"
+
   name  = "example-${[[replace]](basename([[path.cwd]]), "_", "-")}"
 
   region = "eu-west-1"
 
   region = "eu-west-1"
 
   tags = {
 
   tags = {
Line 11: Line 14:
 
   }
 
   }
 
  }
 
  }
 +
 +
== Related ==
 +
* <code>[[dirname]]</code>
 +
* <code>[[pwd]]</code>
 +
* <code>[[usage]]</code>
 +
* <code>[[$PATH]]</code>
 +
* <code>[[readlink]]</code>
 +
* [[brew --prefix]]
  
 
== See also ==
 
== See also ==
 
* {{Bash}}
 
* {{Bash}}
 +
 +
[[Category:Bash]]

Latest revision as of 09:04, 1 April 2024

Advertising: