Difference between revisions of "Bash brace expansion"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
echo YOUR_TEXT{1,2,3}.txt | echo YOUR_TEXT{1,2,3}.txt | ||
− | cp | + | [[cp -v]] file1.txt{,.bak} |
+ | [[cp]] /etc/httpd/httpd.{,.[[BAK]]} | ||
+ | |||
+ | |||
+ | == Related == | ||
+ | * <code>[[for]]</code> | ||
+ | * [[CTRL+R]] | ||
+ | * [[Bash arithmetic integer expansion]] | ||
== See also == | == See also == | ||
* {{Bash}} | * {{Bash}} | ||
− | |||
[[Category:Bash]] | [[Category:Bash]] |
Latest revision as of 06:53, 22 January 2024
https://www.cyberciti.biz/faq/explain-brace-expansion-in-cp-mv-bash-shell-commands/
echo YOUR_TEXT{1,2,3}.txt
cp -v file1.txt{,.bak}
cp /etc/httpd/httpd.{,.BAK}
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: