This commit is contained in:
2019-08-11 11:21:30 +02:00
parent 6c393e6874
commit 6bf6471098
7 changed files with 418 additions and 9 deletions

View File

@@ -5,7 +5,7 @@
Redirige la sortie standart vers un nouveau fichier:
```bash
bruno@macbook-pro:~$ ls > liste.txt
$ ls > liste.txt
```
@@ -13,7 +13,7 @@ bruno@macbook-pro:~$ ls > liste.txt
Redirige la sortie standart vers un fichier (ajoute à la suite):
```bash
bruno@macbook-pro:~$ ls >> liste.txt
$ ls >> liste.txt
```
@@ -23,7 +23,7 @@ bruno@macbook-pro:~$ ls >> liste.txt
Considère liste.txt comme entrée standart (au lieu du clavier):
```bash
bruno@macbook-pro:~$ sort < liste.txt
$ sort < liste.txt
```
@@ -31,5 +31,28 @@ bruno@macbook-pro:~$ sort < liste.txt
#### On peut combiner les 2
```bash
bruno@macbook-pro:~$ sort < liste.txt > liste_triee.txt
```
$ sort < liste.txt > liste_triee.txt
```
#### Erreurs
Rediriger les erreurs vers un fichier:
```bash
$ UneCommande & > fichier-erreurs.txt
```
Rediriger les erreurs vers un fichier (ajoute à la suite)::
```bash
$ UneCommande & > fichier-erreurs.txt
```
Rediriger la sortie et les erreurs vers un fichier:
```bash
$ UneCommande 2>&1 | tee fichier.txt
```