Timeline for Using a generated list of filenames as argument list -- with spaces
Current License: CC BY-SA 3.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 11, 2020 at 12:04 | history | edited | CommunityBot |
Commonmark migration
|
|
| Apr 13, 2017 at 12:37 | history | edited | CommunityBot |
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
|
|
| May 22, 2015 at 14:02 | comment | added | clacke |
In fact, just this week I used printf "%s\0" and xargs -0 to route around a quoting situation where an intermediate tool would pass parameters through a string parsed by a shell. Quoting always comes back to bite you.
|
|
| May 22, 2015 at 13:57 | comment | added | clacke |
The null-terminated element array format is the simplest and therefore safest way to express an array. It's just a shame that bash doesn't support it natively like apparently zsh does.
|
|
| May 22, 2015 at 13:53 | comment | added | clacke |
The question is "Isn't there some way to protect spaces in backtick (or $(...)) expansion?", so it seems appropriate to ignore processing that is not done in that situation.
|
|
| May 22, 2015 at 13:50 | comment | added | clacke | I'm glad backquotes don't do quote processing. The fact that they even do word splitting has caused enough confused looks, head-scratching and security flaws in modern computing history. | |
| May 22, 2015 at 10:20 | comment | added | alexis |
Thanks for all the trouble but your basic premise ignores the fact that bash normally uses an elaborate system of quote processing. But not in backquote expansion. Compare the following (which both give errors, but show the difference): ls "what is this" vs. ls `echo '"what is this"'` . Someone neglected to implement quote processing for the result of backquotes.
|
|
| May 22, 2015 at 7:55 | history | edited | clacke | CC BY-SA 3.0 |
Updated with timing information for the huge arg array construction
|
| May 21, 2015 at 18:58 | history | answered | clacke | CC BY-SA 3.0 |