First of all I have little to no idea what I'm doing, but basically have a script file that works just fine, but I would like to have user input variables. I'm using cygwin and imagemagick. I cd my way to the folder of images I want to logo and use this script:
#!/bin/bash
for f in *.jpg; do convert "$f" -verbose -auto-orient -sharpen 5 -gravity
southeast -draw 'image over 0,0 0,0 "l:/temp/logo.png"' -define
jpeg:extent=1500kb l:/temp/og-rotate-logo/"$f"; done
I would love it if instead of writing a new script all the time to change some of the numbers, I could have the script run and the user be prompted to input the amounts and the script would use these inputs. For example I would like to adjust the sharpen level to 4 instead of 5 I have to write and save a new script with 4, but if the user could input the sharpen level they want that would be great! Any help is greatly appreciated. I'm obviously a newbie.
Just want to say thanks to Aaron for the help in pointing me in the right direction. I got this code working great. Thanks again for taking the time for a newbie. We all started somewhere.
#!/bin/bash
read -p "Enter Sharpen Value (5) " sharpenvalue; read -p "Enter Saturation
Value (105) " saturationvalue; read -p "Enter File Size Value (1500) "
filesizevalue; for f in *.jpg; do convert "$f" -verbose -auto-orient -sharpen
"$sharpenvalue" -modulate 100,"$saturationvalue" -gravity southeast -draw
'image over 0,0 0,0 "l:/temp/logo.png"' -define
jpeg:extent="$filesizevalue"kb l:/temp/og-rotate-logo/"$f"; done