use sed to get the right output for the server variable and replace it