Quantcast
Channel: User Kamil Maciorowski - Super User
Viewing all articles
Browse latest Browse all 837

Comment by Kamil Maciorowski on How to get a list of existing files from a list of files?

$
0
0
The code will or may break or misbehave for unfortunate enough pathnames. Not for the pathnames in question (at least with standard IFS), but in general: for pathnames with leading hyphen, pathnames containing spaces or characters that trigger globbing. In general this unquoted $() is not a good practice, unless one really knows what he or she is doing. For the pathnames in question the code seems enough and not overcomplicated (a virtue), still future readers of this answer who may want to use it with unfortunate pathnames should be warned.

Viewing all articles
Browse latest Browse all 837

Trending Articles