[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Findutils-patches] xargs problem

From: aws backup
Subject: [Findutils-patches] xargs problem
Date: Tue, 20 Dec 2016 00:23:39 +0200

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' address@hidden) && 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,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]