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=\"" &amp; myvar &amp; "\" -overwrite_original_in_place \"" &amp; (POSIX path of myitem) &amp; "\""
        do shell script myscript
    end repeat
end run