Ask for text, pass to terminal, in Automator
If you're not particularly bound to using Automator's "Ask for text" command, you could do this:
In your service, have the action item be "Run AppleScript" rather than "Run Shell Script"
Use this AppleScript:
on run {input, parameters}
set myvar to text returned of (display dialog "What F-stop do you want to set?" default answer "1.8")
repeat with myitem in input
set myscript to "exiftool -FNumber=\"" & myvar & "\" -overwrite_original_in_place \"" & (POSIX path of myitem) & "\""
do shell script myscript
end repeat
end run
Oh well, I was working on doing the same thing as @Daniel.
But I was trying to only pass the exiftool command once. So now you have a choice :-).
property ExifTool : "PathTo/exiftool -FNumber="
property ExifToolOption : "-FNumber="
on run {input, parameters}
set pathList to ""
repeat with i from 1 to count of items of input
set this_item to item i of input
set pathList to pathList & space & "\"" & (POSIX path of this_item) & "\"" as string
end repeat
display dialog "Enter FNumber" default answer "" buttons {"Cancel", "OK"} default button 2
set fStop to text returned of the result
set fStop to fStop as number
do shell script ExifTool & space & ExifToolOption & fStop & space & "-overwrite_original_in_place" & space & pathList
end run