machineName=machine1
Replace: MACHINEDOTS="'uname -n'" to MACHINEDOTS="machine1"
I tried the following sed cmd,
sed 's/MACHINEDOTS="'uname -n'"/MACHINEDOTS="'$machineName'"/g' tmp mv -f tmp path
Error displayed: sed: invalid option -- '"'
When I try to run your example on Mac OS X 10.7, I get an "unterminated substitute pattern" because you used a double quote " instead of either a single quote ' or a backquote `.
Replacing the double quote with a single quote and getting rid of the garbage after tmp (did you mean && mv -f tmp path ?) like this:
sed 's/MACHINEDOTS=''uname -n''/MACHINEDOTS="'$machineName'"/g' tmp
works, but I'm not 100% sure whether this is what you want.