Grimoire-
Command
.es

GNU+Linux command memo

Pipe stderr in addition to stdout

shell Python code

Rediriger la sortie d’erreur en plus de la sortie standard vers la commande suivante

$ $command |& grep 'something' (1)
$ $command 2>&1 | grep 'something' (2)
1 modern short form (bash, zsh…)
2 standard form
$ python3 -c "print('foo')" | grep 'foo'
foo
$ python3 -c "print('foo')" |& grep 'foo'
foo
$ python3 -c "import sys; print('bar', file=sys.stderr)" |& grep 'bar'
bar

Plus de théorie, en français, sur le sujet : Memo_4 : flux de données.

Selection

  • Check SSD remaining lifetime
  • Save data from lost partition
  • Cipher external Android SDcard
  • Recommanded Firefox addons
  • doc_crawler.py : Extract site PDFs
  • 20 mémos "ligne de commande"
  • [Mémo 8] compression de fichiers
  • [Mémo 10] explorer le matériel
  • Tectonique de la pâte thermique
  • Doc. AsciiDoctor en français
  Articles | Command.es | Mémos

Themes  

  • Artix
  • Debian
  • Fairphone
  • Firefox
  • Git
  • JavaScript
  • KVM
  • Memo
  • Nim
  • Python
  • SSH
  • Tor
  • Xorg
  • adminsys
  • android
  • asciidoc
  • benchmark
  • bluetooth
  • code
  • comfort
  • compression
  • database
  • date
  • game
  • hardware
  • install
  • metadata
  • mount
  • music
  • mutt
  • network
  • optimize
  • regex
  • repair
  • security
  • shell
  • storage
  • vim

Sponsor

Meta-Press.es: search-engine

Liberapay   Patreon

Support via BTC 12z7pK5YFcmG7PGJ985dFtnRzwtxDVDmwc

A propos  Flux