Former-commit-id:a02aeb236c
[formerly9f19e3f712
] [formerlya02aeb236c
[formerly9f19e3f712
] [formerly06a8b51d6d
[formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f]]] Former-commit-id:06a8b51d6d
Former-commit-id:8e80217e59
[formerly3360eb6c5f
] Former-commit-id:377dcd10b9
41 lines
1.2 KiB
Bash
41 lines
1.2 KiB
Bash
#!/bin/sh
|
|
#
|
|
# pcrename - use the include file name list for PC's to rename include files
|
|
#
|
|
# SAM, RTi (2-11-93)
|
|
#
|
|
# 1. Copy all of the files from /usr/local/src/NWS/calb/include to another
|
|
# directory.
|
|
# 2. Run this program by typing:
|
|
#
|
|
# pcrename
|
|
#
|
|
# 3. All of the include files should be renamed to names which will work in
|
|
# the DOS world.
|
|
#
|
|
|
|
pcfile="includes.pc"
|
|
|
|
ls | cut -f9 | (
|
|
while [ "1" = "1" ] # read name of each include file
|
|
do
|
|
read original
|
|
if [ "$original" = "" ]
|
|
then
|
|
exit 0
|
|
fi
|
|
new=`cat $pcfile |
|
|
awk '{ if ( $1 == original ) print $2 }' original=$original -`
|
|
if [ "$new" = "" ]
|
|
then
|
|
echo "Unable to rename \"$original\""
|
|
else echo "Ranaming \"$original\" to \"$new\"..."
|
|
if [ -f "$original" ]
|
|
then
|
|
mv $original $new
|
|
fi
|
|
fi
|
|
done
|
|
)
|
|
|
|
exit 0
|