brace-expansion

Tricky brace expansion in shell

When using a POSIX shell, the following touch {quick,man,strong}ly expands to touch quickly manly strongly Which will touch the files quickly, manly, and strongly, but is it possible to dynamically create the expansion? For example, the following illustrates what I want to do, but does not work because of the order of expansion: T...

How to do brace expansion tab-completion, for filenames in vim?

In vim (and bash), you can specify alternatives in filenames, eg: :arga project/html/{index,sitemap}.html This expands to "project/html/index.html" and "project/html/sitemap.html" (the :arga appends them both to the argument list; you can get to them with :n). Now, vim already does some filename completion on this, with TAB, by cycli...

bash shell program

!/bin/bash echo Enter the num read n for i in { 1..10 } do m=$(( n*i )) echo "$i * $n" = $m done i got error as for: 8: Illegal number: { kindly suggest a solution ...

(zsh brace expansion | seq) for character lists - how ?

Bash allows me to write the statement, $ for i in {h..k} ; do echo $i ; done but zsh only allows number list expansion such as {8..13}. What's the best workaround? Something like seq for characters... ...

When do you use brace expansion?

I understood what brace expansion is. But I don't know where I use that. When do you use it? Please give me some convenient examples. Thanks. ...