Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

svg_preview.sh does not support spaces in filenames #1

Open
lucasvieites opened this issue Apr 23, 2018 · 0 comments
Open

svg_preview.sh does not support spaces in filenames #1

lucasvieites opened this issue Apr 23, 2018 · 0 comments
Assignees

Comments

@lucasvieites
Copy link
Owner

lucasvieites commented Apr 23, 2018

This issue is already in the TODO list of this script; using the for loop to process the output of the find command is essentially flawed, but that is a known pitfall of bash.

If this script encounters a filename with a space, it will break because it will try to process all parts of the file name separated by a space as a different file.

This is an example on the right way to do it:

while read -rd $'\0' file; do
    something with "$file"
done < <(find  . -type f -name '*.*' -print0)

Additional info:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant