mirror of
https://github.com/ProjectEQ/projecteqquests
synced 2026-08-12 00:26:10 -04:00
16 lines
277 B
Bash
Executable file
16 lines
277 B
Bash
Executable file
#!/bin/sh
|
|
|
|
for f in */[0-9]*.pl
|
|
do
|
|
N=`cat $f | grep '#END' | cut -d- -f3 | tr -d '[ \t\n\r]'`
|
|
if [ -z "$N" ]; then
|
|
echo "$f had no standard name in it"
|
|
continue;
|
|
fi
|
|
D=`dirname "$f"`
|
|
if [ ! -r "$D/$N.pl" ]; then
|
|
echo "$f -> $D/${N}.pl"
|
|
mv $f "$D/${N}.pl"
|
|
fi
|
|
done
|
|
|