4 ms·
You mean not splitting on spaces? No, never, ever bit me.
by yourad_io 5y ago
You mean not splitting on spaces?
No, never, ever bit me.
- faho 5y agoSpeaking with my fish developer hat on: The only common case where we find that splitting on spaces is actually needed is pkg-config and related tools, because that prints flags to be passed to the compiler, and it does it with spaces so it looks nicer and copy-pasteable: $ pkg-config --libs gio-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 (ideally, it would simply use newlines here, which bash et al would also split on) Typically, the easy workaround is `string split " "`: > somecommand (pkg-config --libs gio-2.0 | string split " ") Otherwise, this is quite rare in practice. Most unix tools already operate on a line-by-line basis, which allows them to be easily greppable.