Difference between revisions of "Basename"
Jump to navigation
Jump to search
↑ https://man7.org/linux/man-pages/man1/basename.1.html
(Created page with " usage") Tags: Mobile web edit, Mobile edit |
|||
(16 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 | ||
+ | basename . | ||
+ | . | ||
+ | [[Terraform]] | ||
+ | locals { | ||
+ | name = "example-${[[replace]](basename([[path.cwd]]), "_", "-")}" | ||
+ | region = "eu-west-1" | ||
+ | tags = { | ||
+ | Owner = "user" | ||
+ | Environment = "dev" | ||
+ | } | ||
+ | } | ||
− | [[usage]] | + | == Related == |
+ | * <code>[[dirname]]</code> | ||
+ | * <code>[[pwd]]</code> | ||
+ | * <code>[[usage]]</code> | ||
+ | * <code>[[$PATH]]</code> | ||
+ | * <code>[[readlink]]</code> | ||
+ | * [[brew --prefix]] | ||
+ | |||
+ | == See also == | ||
+ | * {{Bash}} | ||
+ | |||
+ | [[Category:Bash]] |
Latest revision as of 09:04, 1 April 2024
wikipedia:basename [1] strip directory and suffix from filenames
basename . .
locals { name = "example-${replace(basename(path.cwd), "_", "-")}" region = "eu-west-1" tags = { Owner = "user" Environment = "dev" } }
Related[edit]
See also[edit]
Bash [ -c ]
,alias
,&&
, Bash history, Autocompletion,set
,unset
,export
,.bash_aliases, .bashrc and .bash profile
,PS1
,echo
,brace expansion
, Function,shopt
,trap
,set -e
,source
,PATH
,complete
,disown
,.hushlogin
,.bashrc
,builtin
,eval
,set
,$PATH
,$HOME
,TZ
,.profile
,-e, -i
,Builtin (Bash)
,mapfile
,~
, return (Bash), for, until,declare, dirname, basename, functions.sh
, Bash arithmetic expansion,shift, bash --rcfile, readonly, $1, $@
Advertising: