←back to thread

529 points swills | 1 comments | | HN request time: 0.2s | source
Show context
pyuser583 ◴[] No.45688089[source]
I've used /dev/null for exactly this purpose. I have output that needs to go somewhere, and I don't want to worry about whether that somewhere can handle it.

Later on in deployment, it will go somewhere else. Somewhere that has been evaluated for being able to handle it.

In that way, /dev/null is to storage what `true` is to execution - it just works.

replies(1): >>45688260 #
CaptainOfCoit ◴[] No.45688260[source]
Bug free software is a pipe dream, but if there is anything I've never encountered any bugs with, /dev/null and true is certainly in the top 3.
replies(4): >>45688480 #>>45688959 #>>45690296 #>>45692706 #
noir_lord ◴[] No.45688480[source]
Joking aside I can’t ever remember seeing a bug in either bash or zsh, never seen either crash or segfault and anytime I’ve had weirdness it’s always turned out to be me missing something.

Both (along with a lot of the standard utilities) are a testament to what talented C programmers plus years of people beating on them in unintended ways can achieve in terms of reliability/stability.

replies(7): >>45688631 #>>45688712 #>>45689009 #>>45689182 #>>45689808 #>>45689909 #>>45692642 #
1718627440 ◴[] No.45689182[source]
Programs not outputting a final newline to stdout leave a prompt that doesn't start on column 0, and readline seams to not takes this into consideration, but still optimizes redraws and overwrites so you get an inconsistent display. This bugs seam to exist in a lot of shells and interactive programs. The program causing the issue isn't POSIX conform though.
replies(2): >>45689424 #>>45692721 #
1. latexr ◴[] No.45689424[source]
> seams

The correct spelling is “seems”. I first assumed it was a typo, but since you did it twice I thought you might like to know.