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 :
|
Exemple :
|
||||||
|
|
||||||
> TODO faire un meilleur exemple.
|
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
$ echo a b c
|
$ echo a b c
|
||||||
a b c
|
a b c
|
||||||
$ echo !! d
|
$ !! d
|
||||||
echo echo a b c d
|
|
||||||
echo a b c d
|
echo a b c d
|
||||||
$ ^d^D^
|
a b c d
|
||||||
echo echo a b c D
|
$ echo !$
|
||||||
echo a b c D
|
echo d
|
||||||
$ echo !:2 !$
|
d
|
||||||
echo a D
|
$ !-3
|
||||||
a D
|
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
|
# Fichiers et FS
|
||||||
|
|
Loading…
Reference in a new issue