What is Nostr?
Annika Backstrom /
npub104g…lsyy
2024-08-30 21:51:47

Annika Backstrom on Nostr: `cmd > file.txt 2>&1` vs `cmd 2>&1 > file.txt` always tripped me up: the first form ...

`cmd > file.txt 2>&1` vs `cmd 2>&1 > file.txt` always tripped me up: the first form is what I usually want (send both to file.txt) but always felt backwards to my brain.

Prompted by Julia, I read up on https://www.gnu.org/software/bash/manual/html_node/Redirections.html and tried to understand why the first incantation sends both outputs to file.txt

Also TIL zsh "MULTIOS" which sends stdout to your pipe even if you've redirected to a file.

Author Public Key
npub104glyxzcsa3ylpfm9sfzad95zfy83rfxas9w5wru7xkzncsx750q35lsyy