Raw Input
a b "c d e" f g "h i"
Desired Output
a b "c-d-e" f g "h-i"
Script and Comments
Script1
[ 1] s/"[^"]*"/\n&/g
[ 2] :loop
[ 3] s/\(\n"[^"]*\) \([^"]*"\)/\1-\2/
[ 4] t loop
[ 5] s/\n//g
Comments
  1. We use
    a b "c d e" f g "h i"
    as an example.
  2. Step [1] will insert a newline character at the beginning of every double-quoted string, make the line above be
    a b \n"c d e" f g \n"h i"
    This will eliminate the chance of mistaking " f g " for a double-quoted string.
  3. Step [2] thru [4] constitute a loop. This loop will process double-quoted strings from left to right, and replace space characters of a string from right to left. The pattern space will be changed in the following sequence:

    a b \n"c d-e" f g \n"h i"

    a b \n"c-d-e" f g \n"h i"

    a b \n"c-d-e" f g \n"h-i"
  4. Step [5] will remove all newline characters added by step [1].