FAQ BASH

Redirigere lo standard error sullo standart output

Per redirigere lo standard error di un comando in shell basta utilizzare la seguente sinstassi seguente:

ls file_non_esistente 2>&1 | grep File

oppure ancor meglio per non avere sul terminale lo standard error basta buttarlo in /dev/null

ls file_non_esistente 2>/dev/null

Gli identificativi standard o canali standard (o standard streams) aperti automaticamente sono: