Am trying to create one and add the same to the cron. This is the commands I am trying to run through the script.
#!/bin/bash
find . -mmin -60 -name "*.jpg" $(printf "! -name %s " $(cat processed.txt) ! -name cache) -exec convert -resize 1000x800 -quality 85% {} {};
find -mmin -60 -type f -name "*.jpg" -exec basename {} \; &> processed.txt
f I am running these commands directly on shell, I don't get any error. but if say I have stored this in a file called compress and run the script as ./compress I get the error -
find: missing argument to `-exec'
what mistake I am making and how I can fix that.
findcommands, both having the-execoption. Which of them fail?findmissing a path to search in? Perhaps it's the missing backslash before the semicolon to terminate the-execin the firstfindcommand?processes.txtwhich the first command uses...