Re: Bash usage: was implicit linkage
On Sun, 12 Oct 2014, Steve Litt wrote:
> This essay practically screams out for somebody to write a C program
> that takes an argument of an arbitrary string, finds all files in a
> directory, and returns a long string with those files separated by the
> arbitrary string.
You seem to be looking for find -print0; \0 is one of the few characters
which is not valid to have in a file name.
It's not like it's that hard to do this properly in a policy compliant
POSIX shell, either. Use IFS and reset it as appropriate, or properly
quote things.
--
Don Armstrong http://www.donarmstrong.com
Il semble que la perfection soit atteinte non quand il n'y a plus rien
a ajouter, mais quand il n'y a plus rien a retrancher.
(Perfection is apparently not achieved when nothing more can be added,
but when nothing else can be removed.)
-- Antoine de Saint-Exupe'ry, Terres des Hommes
Reply to: