#!/bin/sh # Copyright for the Uniform Repository Service (c) 1997, # by Gerald Banon. All rights reserved. # Version 1.1 # indexsearch pid=$$ col=../../../../.. serv=dpi.inpe.br/banon/1995/08.08.00.00 string=`echo $QUERY_STRING | sed 's/^q=//' | sed 's/+/ /g'` cd $PATH_INFO/col/$serv/not_sent # level 0 from not_sent mkdir .t$pid echo $string >.t$pid/ax echo s .t$pid/z2 >>.t$pid/ax echo q >>.t$pid/ax rm -f $col/`cat .setenv/index_path`/not_sent/@reference.bib ln $col/`cat .setenv/index_path`/doc/@reference.bib \ $col/`cat .setenv/index_path`/not_sent/@reference.bib if test ! -f $col/`cat .setenv/index_path`/not_sent/@reference.bix then ../../../../../../col/dpi.inpe.br/banon/1995/09.21.16.26/\ doc/bibindex \ $col/`cat .setenv/index_path`/not_sent/@reference.bib >.t$pid/x2 fi ls -t $col/`cat .setenv/index_path`/not_sent/@reference.bi? | \ sed '$d' | \ sed 's/^.*not_sent\/@reference.bi//' >.t$pid/x3 if test `cat .t$pid/x3` = b then ../../../../../../col/dpi.inpe.br/banon/1995/09.21.16.26/\ doc/bibindex \ $col/`cat .setenv/index_path`/not_sent/@reference.bib >.t$pid/x4 fi cat .t$pid/ax | \ ../../../../../../col/dpi.inpe.br/banon/1995/09.21.16.26/\ doc/biblook $col/`cat .setenv/index_path`/not_sent/@reference.bib >.t$pid/z3 if test -s .t$pid/z2 then # search works cat .t$pid/z2 | sed -n '/^ repository = /p' | \ sed 's/^ repository =[ ]*"//' | sed 's/",$//' >.t$pid/z4 cat .t$pid/z4 | \ awk '{ printf "ls '$col'/%s/bib/*/.h/@z >>.t'$pid'/z6\n", $1 }' >.t$pid/z5 chmod +x .t$pid/z5 rm -f .t$pid/z6 .t$pid/z5 # ls >.t$pid/z6 echo cat \\ >.t$pid/y1 cat .t$pid/z6 | awk -F/ \ '{ print $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13 }' | \ sort +10 | sed 's/ /\//g' | sed 's/$/ \\/' >.t$pid/y2 echo '>.t'$pid'/output' >.t$pid/y3 cat .t$pid/y1 .t$pid/y2 .t$pid/y3 >.t$pid/y4 chmod +x .t$pid/y4 .t$pid/y4 # >.t$pid/output else # search fails cat .t$pid/z3 | sed '1,2d' >.t$pid/output fi ll=`cat .setenv/library_location` # ll ip=`cat .setenv/index_path` # ip nb=`cat .t$pid/output | egrep '^
' | wc -l` # nb cat <<% Content-Type: text/html