![](https://lemmy.villa-straylight.social/pictrs/image/596c53bc-effa-419d-96fa-5eebe3fcdf3d.png)
![](https://lemmy.ml/pictrs/image/q98XK4sKtw.png)
It's certainly no bad habit to handle spaces in scripts preemptively, and obviously they do occur in the wild. Quotes from ls output do not get piped to other commands. I had to look that up myself right now, because it has been quite a while since it mattered to me.
$ touch 'file with spaces in name'
$ ls
'file with spaces in name'
$ ls | cat
file with spaces in name
$
Looking through some scripts I wrote back in the day, I seem to like to use ls -1
in scripts. I guess that reduces ambiguity on what the separator is.
Oh man, I am too tired. I read that as "Some comrades can't be executed by keyboard shortcuts ..." and was like, wtf! Then I read it again.