Auteur Sujet: [bash] expand a command in a shell  (Lu 4664 fois)

0 Membres et 1 Invité sur ce sujet

Hors ligne melodie

  • Administrateur
  • Membre Héroïque
  • *****
  • Messages: 1774
    • Citrotux
[bash] expand a command in a shell
« le: 03 mai 2015 à 14:00:07 »
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:

[me@linuxbox me]$ echo D*
Desktop Documents
[me@linuxbox me]$ echo $(($((5**2)) * 3))

[me@linuxbox Photos]$ mkdir {2007..2009}-0{1..9} {2007..2009}-{10..12}

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.

Good leaders being scarce, following yourself is allowed.