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

Folder paths with spaces are parsed wrong #4

Open
1manfactory opened this issue Nov 22, 2022 · 1 comment
Open

Folder paths with spaces are parsed wrong #4

1manfactory opened this issue Nov 22, 2022 · 1 comment

Comments

@1manfactory
Copy link

inotifywait-polling -e close_write,moved_to,create -m "/mnt/winshare/Customer Service/Data/" .

gives error

find: '/mnt/winshare/Customer': No such file or directory

@robross0606
Copy link

This is due to incorrect use of cut:

file=$(echo ${line} | cut -s -d' ' -f4)

Instead, this will work:

file=$(echo ${line} | cut -s -d' ' -f3-)

This gets everything from the 3rd ' ' delimiter and forward, instead of just the 4th delimiter which ends up being incorrect when a path has spaces.

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

No branches or pull requests

2 participants