using convert with find in script
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: using convert with find in script
seems fine to me.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: using convert with find in script
Do you think it could be Ubuntu causing the error?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: using convert with find in script
More likely directory content and file permissions.
If you add "-r" to "xargs", then it will never execute the "xargs" command, if no files were found by "find".
As for why it is empty, does the directory exist and have ".jpg" or ".JPG" files?
also the parenthesis much be space separated from the other "find" arguments in find. that is \( and \) must have spaces on both sides to make it a separate argument to "find".
If you add "-r" to "xargs", then it will never execute the "xargs" command, if no files were found by "find".
As for why it is empty, does the directory exist and have ".jpg" or ".JPG" files?
also the parenthesis much be space separated from the other "find" arguments in find. that is \( and \) must have spaces on both sides to make it a separate argument to "find".
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: using convert with find in script
Sorry it took so long to respond. I got a lot of projects on my desk. I double checked the spacing and there was no space between the pipe and the \). I also checked the permissions. The directories are set to 755 and the scipt is 777. The directory that is holding the files just has 1 jpg and 1 png for testing purposes. I ran the script again with the echo and it's still blank.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: using convert with find in script
All I can suggest is to simply the find until you get it working, so as to discover where the problem is.
From what I can see it should be working.
From what I can see it should be working.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/