nsbin/old/replace-old-files
Nico Schottelius c23bfc5a82 reorganise more old stuff
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
2009-12-28 20:13:28 +01:00

14 lines
260 B
Text
Executable file

FILE=/tmp/replace-`date +%s`
OLD_STRING=/usr/old-files/bin
NEW_STRING=/usr/bin
if [ $# -ne 1 ]; then
echo neo
exit 1
fi
if [ `grep "$OLD_STRING" "$1"` ]; then
echo "$1"
cat "$1" | sed "s,$OLD_STRING,$NEW_STRING,g" > "$FILE"
mv "$FILE" "$1"
fi