Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > fr.comp.os.unix > #8075

Re: sortie erreur -> pipe

Path csiph.com!weretis.net!feeder8.news.weretis.net!news.imp.ch!news.alphanet.ch!alphanet.ch!.POSTED!not-for-mail
From Marc SCHAEFER <schaefer@alphanet.ch>
Newsgroups fr.comp.os.unix
Subject Re: sortie erreur -> pipe
Date Sun, 7 May 2023 09:46:34 -0000 (UTC)
Organization Posted through news.alphanet.ch
Message-ID <u37s1p$prr$1@shakotay.alphanet.ch> (permalink)
References <fantome.forums.tDeContes-7BAFDF.15454306052023@news.eternal-september.org>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 8bit
Injection-Date Sun, 7 May 2023 09:46:34 -0000 (UTC)
Injection-Info shakotay.alphanet.ch; posting-account="schaefer"; logging-data="26491"; mail-complaints-to="usenet@alphanet.ch"; posting-host="634ce6c9682d817d72f6177875e2bb4f.nnrp.alphanet.ch"
User-Agent tin/2.4.3-20181224 ("Glen Mhor") (UNIX) (Linux/4.19.0-23-amd64 (x86_64))
Cancel-Lock sha256:nPg8Wc1xFAUN3Y7XzjzHUuE2M6TCYuMRj0lzWh03URs= sha256:HANl1UW5i9rNUfDO12fx3Zt9XutLwJOWEs7eO5em78A=
Xref csiph.com fr.comp.os.unix:8075

Show key headers only | View raw


On Sat, 06 May 2023 15:45:43, Thomas <fantome.forums.tDeContes@free.fr.invalid> wrote:
> comment fait-on pour brancher la sortie erreur, à la place de la sortie 
> standard, sur l'entrée du programme suivant ?

schaefer@reliant:~$ (echo bla; echo >&2 toto) | wc -l 2>/dev/null
toto
1

# stderr ajouté à stdout
schaefer@reliant:~$ (echo bla; echo >&2 toto) 2>&1 | wc -l
2

# stdin et stderr échangés (via fichier 3)
schaefer@reliant:~$ (echo bla; echo >&2 toto) 3>&2 2>&1 1>&3 | wc -l
bla
1

> (est-ce que ma question est suffisamment claire ?)

non, d'où quelques variantes :)

-- 
Attention: limitez le nombre de lignes de citation à l'essentiel, sinon
je ne verrai pas votre réponse. Et si vous écrivez souvent des bobards,
je ne vous lirai plus et je recommanderai (NoCeM) de ne plus vous lire.

Back to fr.comp.os.unix | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

sortie erreur -> pipe Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2023-05-06 15:45 +0200
  Re: sortie erreur -> pipe Marc SCHAEFER <schaefer@alphanet.ch> - 2023-05-07 09:46 +0000
    Re: sortie erreur -> pipe Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2023-05-07 15:48 +0200
      Re: sortie erreur -> pipe Christophe PEREZ <chris@novazur.fr> - 2023-05-07 16:27 +0000
        Re: sortie erreur -> pipe Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2023-05-26 14:30 +0200
      Re: sortie erreur -> pipe Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2023-06-04 17:10 +0200

csiph-web