On Fri, May 03, 2024 at 07:42:20AM +0800, jeremy ardley wrote: > > On 3/5/24 07:29, Greg Wooledge wrote: > > > The spaces without quotes cause problems with subsequent processing. > > Then the subsequent processing has bugs in it. Fix them. > > > > > Can realpath or other utility return a quoted pathname? > > That would be extremely counterproductive. Do not look for kludges to > > work around your script's bugs. Fix the bugs instead. > > > > Start with<https://mywiki.wooledge.org/Quotes>. > > > > You don't see a problem that ls produces quoted filenames and realpath > doesn't?
Oh Jesus, don't get me started on ls. We have a whole page on that. <https://mywiki.wooledge.org/ParsingLs>