Projects and resources (En) > Tips and tricks

[bash] expand a command in a shell


Reading a doc, seeing "expand the commands", I thought I don't know what "expanding a command" mean, though I probably do it currently without me knowing I do it. A search on the web brought that page which I want to share, as there are commands I never used in it:

such as:

--- Code: ---
[me@linuxbox me]$ echo D*
Desktop Documents

--- Fin du code ---

--- Code: ---[me@linuxbox me]$ echo $(($((5**2)) * 3))
--- Fin du code ---


--- Code: ---[me@linuxbox Photos]$ mkdir {2007..2009}-0{1..9} {2007..2009}-{10..12}
--- Fin du code ---

--- Citer ---Expansion

Each time you type a command line and press the enter key, bash performs several processes upon the text before it carries out your command. We have seen a couple of cases of how a simple character sequence, for example “*”, can have a lot of meaning to the shell. The process that makes this happen is called expansion.
--- Fin de citation ---


[0] Index des messages

Utiliser la version classique