let replace_env_value file envname newvalue = let oldvalue = sprintf "setenv\t%s\t.*" envname in let newvalue = sprintf "setenv\t%s\t%s" envname newvalue in replace_value file oldvalue newvalue