3 ms·
Yes, in other words, the parent is right that zero termination is currently not automatic.
by alexlarsson 14y ago
Yes, in other words, the parent is right that zero termination is currently not automatic.
- dfc 14y agoHe did not say automatic, he said "knew about" nulls. When you talk about automagically detecting nulls I have this image of an ascii-art Clippy with a cowsay bubble that says "I see you are using null terminated data, I have enabled --null for you."
- alexlarsson 14y ago"automatically knew", in a post which talks about format negotiation. It was fairly obvious to me he meant that it would use the format negotiation to automatically enable the --null switch.
- rogerbinns 14y agoI did exactly say automatic. It is the previous word to "knew about" you quoted! And yes, I would expect that find detects that when it is talking to xargs then null termination should be used without the user having to go and fish out what the options are for each tool. And if you used ps with another tool that prefers json then ps can automatically do that, again without having to find and maintain flags.
- ibotty 14y agonull-terminated strings are hard to read in a shell window. and isatty(3) does not work for pagers. content nagotiation only works with bi-directional data transfer (i.e. not with pipes).
- alexlarsson 14y agoThats only true if you only negotiate via data in the pipe. dtools (in the article) uses non-mandatory file locks to do the content negotiation on the pipe.