let replace_value file oldvalue newvalue =
let escape_slash = escape_char ~needle:'/' in
let file_org = file in
let file_bak = file_org ^ ".bak" in
KEDSL.Program.(
shf "mv %s %s" file_org file_bak &&
shf "sed -e 's/%s/%s/g' %s > %s"
(escape_slash oldvalue) (escape_slash newvalue) file_bak file_org &&
shf "rm -f %s" file_bak
)