5 Matching Annotations
- Apr 2021
-
serverfault.com serverfault.com
-
perl -ne 'chomp(); if (-e $_) {print "$_\n"}'
-
xargs -i sh -c 'test -f {} && echo {}'
-
-
unix.stackexchange.com unix.stackexchange.com
-
Gilles has written an excelent answer here (see unix.stackexchange.com/a/105655/49721) explaining why "A space-separated list of file names doesn't really work: what if one of the file names contained spaces?"
-
If it's a list of actual pathnames, just replacing spaces by newlines may obviously mangle pathnames that contain embedded spaces, such as /User/myself/VirtualBox VMs/.
-
For path names with newlines it is better to quote each pathname.
-