Expension
De Linuxmemo.
(Différences entre les versions)
(→Bash expension) |
|||
Ligne 2 : | Ligne 2 : | ||
==Bash expension== | ==Bash expension== | ||
- | mkdir rep{1,2,3} | + | mkdir rep'''{1,2,3}''' |
mkdir: création du répertoire «rep1» | mkdir: création du répertoire «rep1» | ||
mkdir: création du répertoire «rep2» | mkdir: création du répertoire «rep2» | ||
Ligne 8 : | Ligne 8 : | ||
- | cp ntp.conf{,.bak} | + | cp ntp.conf'''{,.bak}''' |
«ntp.conf» -> «ntp.conf.bak» | «ntp.conf» -> «ntp.conf.bak» | ||
ls ntp* | ls ntp* | ||
Ligne 21 : | Ligne 21 : | ||
- | for i in {1..12};do ping -c 1 192.168.0.{$i} ;done | + | for i in '''{1..12}''';do ping -c 1 192.168.0.{$i} ;done |
Version du 10 octobre 2018 à 08:52
Bash expension
mkdir rep{1,2,3} mkdir: création du répertoire «rep1» mkdir: création du répertoire «rep2» mkdir: création du répertoire «rep3»
cp ntp.conf{,.bak} «ntp.conf» -> «ntp.conf.bak» ls ntp* ntp.conf ntp.conf.bak
mv ntp.conf{,.bak} «ntp.conf» -> «ntp.conf.bak» ls ntp* ntp.conf.bak
for i in {1..12};do ping -c 1 192.168.0.{$i} ;done