in reply to Re: sorting a directories contentin thread sorting a directories content
That way you can never be tricked by dodgy files with names like ".\n".
You can replace $ with \z, that is also newline-safe.