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

execute cmd for single filetype #318

Open
t-lie opened this issue Jan 5, 2024 · 0 comments
Open

execute cmd for single filetype #318

t-lie opened this issue Jan 5, 2024 · 0 comments

Comments

@t-lie
Copy link

t-lie commented Jan 5, 2024

Hi,

I getting in a problem using the exclude / include parameter.
If I am using this line, all works fine:
fswatch /data/webdav/data --event Created | xargs -I '{}' sh -c 'filename=$(basename ${1});cp $filename /data/compose/72/consume;rm $filename;' - {}

But if I use this one, no pdf file is recognized:
fswatch /data/webdav/data --event Created -e ".*" -i ".*/[^.]*\\.pdf$" | xargs -I '{}' sh -c 'filename=$(basename ${1});cp $filename /data/compose/72/consume;rm $filename;' - {}

Can anyone help here? Is there any syntax issue?

Thanks!

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

1 participant