Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

UNIX philosophy.

Name: Anonymous 2016-02-15 13:21

Why is the opposite of cat tee, and it's not even a proper opposite but also does a different thing (outputs to stdout) (which is ostensibly its real purpose)?

Also, why do I even need the opposite of cat (and cat itself while we are at it) when those needs should have been served by input and output redirection, but turns out that the latter is completely made up and broken shell bullshit: you can't cat <file1 <file2, and you can't EDITOR='echo zzz >>$1' visudo for example.

Orthogonal design, my ass. Do one thing and do it well, my ass.

Name: Anonymous 2016-02-15 17:33

>>6
I want to sanity-check my edits and apply them atomically. Unfortunately instead of doing one thing well, visudo does three things: sanity-checks edits, manages the temporary/lock file, and calls out the external editor. In fact it provides sanity-checking functionality on its own, but to get it to do both sanity-checking and that bother with renaming files I have to go the way of giving it my own fake editor.

But then it turns out that I can't give it "echo zzz >> $1" or anything like that because it then calls execve("echo", {"zzz", ">>", "$1", "/etc/sudoers"});. Hence the need for a program that does the opposite of cat.

I'm getting more and more convinced that all this "UNIX Philosophy" is one of those cases where things desperately try to hide their nature behind nice sounding words, like DPRK or Free™ Software. Of course there's nothing wrong with UNIX Philosophy itself, it would be really nice to have an OS written according to its principles!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List