view move-if-change @ 5883:d93195c2c906

Escape quotation marks when printing values interactively, #'getenv src/ChangeLog addition: 2015-04-01 Aidan Kehoe <kehoea@parhasard.net> * process.c (Fgetenv): When interactively showing a variable's value, use %S in the format string so quotation marks are escaped correctly.
author Aidan Kehoe <kehoea@parhasard.net>
date Fri, 03 Apr 2015 00:15:18 +0100
parents 376386a54a3c
children
line wrap: on
line source

#!/bin/sh
if
test -r $2
then
if
cmp $1 $2 > /dev/null
then
echo $2 is unchanged
rm -f $1
else
mv -f $1 $2
fi
else
mv -f $1 $2
fi