user11532787
user11532787

Reputation:

Ignoring hidden files in Cweb

Executes the MIME change command:

find . -name "*.png" | xargs -I {} cwebp {} -o {}

cweb failed with error (for hidden files):

Error! Could not process file ./modules/._styl1.jpg
Error! Cannot read input picture file './modules/._styl1.jpg'
xargs: cwebp: came out with state 255; failure

How can cweb ignore hidden files?

Upvotes: 0

Views: 42

Answers (1)

Rudedog
Rudedog

Reputation: 4692

How about just not passing them to cweb in the first place:

find . -name '*.png' | egrep -v '/\.' | xargs -I {} cwebp {} -o {}

Upvotes: 0

Related Questions