1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#!/bin/sh
# Copyright (C) 2009 Osamu Aoki <osamu@debian.org>
#
# This is free software with ABSOLUTELY NO WARRANTY.
#
# You can redistribute it and/or modify it under the terms of
# the GNU General Public License version 2 or later.
#
#
set -e
#set -x
echo "sed \\"
while read X
do
Y=$(echo $X | tr "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" "abcdefghijklmnopqrstuvwxyzabcdefghij"| tr -d " \!#\$%()=\-~^|\\/+*,.?;:@\`\"'&><")
Z=$(echo $Y | sed "s/\(................\).*\(................\)/\1\2/")
W=$(echo "_$X" | tr "ABCDEFGHIJKLMNOPQRSTUVWXYZ -" "abcdefghijklmnopqrstuvwxyz_"|tr -d " \!#\$%()=\-~^|\\/+*,.?;:@\`\"'&><")
echo "-e 's/@{@$Y@}@/<<$W>>/' \\"
if [ $Y != $Z ]; then
echo "-e 's/@{@$Z@}@/<<$W>>/' \\"
fi
done
#
#
# vim: set sts=2 ai expandtab:
|