Hello, I hope I am in the right mailing list.

I would like to run following script:

screen -dmS test2 /bin/bash -c "fswatch -0 -Ie ".*\.*$" -i ".*\.mp4$" 
/path/to/folder | xargs -0 -n 1 -I {} filename=`basename {}`; terminal-notifier 
-message 's3cmd Upload $filename started'; s3cmd put {} s3://bucket/ 2>&1 | tee 
/path/to/logfile | tee >(mail -s 'Upload $filename' [email protected]) && 
terminal-notifier -message 's3cmd Upload of $filename done'"

Without the basename approach it works:

screen -dmS test2 /bin/bash -c "fswatch -0 -Ie ".*\.*$" -i ".*\.mp4$" 
/path/to/folder | xargs -0 -n 1 -I {} s3cmd put {} s3://bucket/"

With the basename command I get following failure: 

xargs: filename=basename {}:: No such file or directory

Where is my mistake?
How can I make it work?

Thank you.
Best Regards,
Robert

_______________________________________________
Findutils-patches mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/findutils-patches

Reply via email to