4 ms·
> > chronic: runs a command quietly unless it fails > Isn't that just `command >/dev/null`? no. that just shows your stderr, not stdout if it failed. and yo
by compsciphd 4y ago
> > chronic: runs a command quietly unless it fails
> Isn't that just `command >/dev/null`?
no. that just shows your stderr, not stdout if it failed. and you get stderr even if it doesn't fail.
- spr93 4y agoso use '2>&1' to redirect stderr to stdout. new ideas are great. but this isn't a new idea. "run a command silently unless it fails" is basic; it's the sort of thing that should make one think "i should search the shell man pages" rather than "i should roll my own new utility."
- NavinF 4y agoRead his comment again. '2>&1' just redirects stderr.