tipsshell: améliorer exemple history expansion
This commit is contained in:
parent
ea28a50c66
commit
df5c384f38
29
TipsShell.md
29
TipsShell.md
|
@ -162,20 +162,29 @@ Les éléments suivants permettent de rappeler des bouts des commandes précéde
|
|||
|
||||
Exemple :
|
||||
|
||||
> TODO faire un meilleur exemple.
|
||||
|
||||
~~~
|
||||
$ echo a b c
|
||||
a b c
|
||||
$ echo !! d
|
||||
echo echo a b c d
|
||||
$ !! d
|
||||
echo a b c d
|
||||
$ ^d^D^
|
||||
echo echo a b c D
|
||||
echo a b c D
|
||||
$ echo !:2 !$
|
||||
echo a D
|
||||
a D
|
||||
a b c d
|
||||
$ echo !$
|
||||
echo d
|
||||
d
|
||||
$ !-3
|
||||
echo a b c
|
||||
a b c
|
||||
|
||||
$ # copier un fichier puis l’éditer
|
||||
$ cp -p file file.old
|
||||
$ vi !:2
|
||||
vi file
|
||||
|
||||
$ # lister puis extraire le contenu d’une archive
|
||||
$ tar --list --file mon-archive.tar
|
||||
[…]
|
||||
$ ^list^extract^
|
||||
tar --extract --file mon-archive.tar
|
||||
~~~
|
||||
|
||||
# Fichiers et FS
|
||||
|
|
Loading…
Reference in a new issue