Script conversion from SCO Open Server to Red Hat Enterprise
needed...
Mike Schwartz
mike.appleton.wi at sbcglobal.net
Tue Jun 6 11:15:56 PDT 2006
I'm trying to get this old Softa script from SCO Open Server (below) to
run on Red Hat Enterprise Linux. I would be willing to pay a reasonable
amount ($50.00?) if somebody can get this to run on Red Hat. I'm running it
from the /u/filepro subdirectory and getting the following errors:
[root at REDHAT filepro]# /tmp/makequal -C -q mmat
: command not found 2:
: command not found 3:
'tmp/makequal: line 23: syntax error near unexpected token `in
'tmp/makequal: line 23: `case $1 in
Here is the full script:
# makequal ljw - Softa 6/9/87
# test for enough arguments
if test "$2"
then :
else
echo "\
syntax:
makequal -[n|c|l] [-q qualifier] filepro_file(s)
-n make a new qualifier
-c copy key, data, and indexes to the new qualifier
-l link key, data, and indexes to the new qualifier
if -q qualifier is not specified, makequal prompts for one."
exit 1
fi
# set the correct paths - if not set already - . /usr/softa/bin/paths
# set the type to new, copy, or link
type=""
case $1 in
-n | -N) type=new;;
-c | -C) type=copy;;
-l | -L) type=link;;
esac
if test "$type"
then :
else
echo "\
syntax:
makequal -[n|c|l] [-q qualifier] filepro_file(s)
-n make a new qualifier
-c copy key, data, and indexes to the new qualifier
-l link key, data, and indexes to the new qualifier
if -q qualifier is not specified, makequal prompts for one."
exit 1
fi
shift
qual=""
case "$1" in
-q | -Q) qual=$2
shift
shift;;
esac
# prompt for the qualifier if the -q qualifier isnt specified test "$qual"
|| {
echo "\nEnter the new qualifier: \c"
read qual
}
for file in $*
do
echo "Working on $file..."
cd $pd/$file
>lockfile
# if qualifier already exists then not a new qualifier
if grep $qual qualify >/dev/null 2>/dev/null
then
if test "$type" = new
then
continue
fi
else
echo $qual >> qualify
fi
case $type in
new) >key$qual
>data$qual
proper key$qual data$qual >/dev/null;;
copy) cp key key$qual
cp data data$qual;;
link) ln key key$qual
ln data data$qual;;
esac
for index in `ls index.* 2>/dev/null | sed "s,index.,,"`
do
case $type in
copy) cp index.$index index$qual.$index;;
new) cp index.$index index$qual.$index;;
link) ln index.$index index$qual.$index;;
esac
done
if test "$type" = new
then $sd/reindex -q $qual -type all $file >/dev/null
fi
proper * > /dev/null
done
echo "\nCreate a new qualifier is complete."
Thanks for any help you can provide! Mike Schwartz
More information about the Filepro-list
mailing list