chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.web-live.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
WIP MIT-SHM; performance checks added; need to test on liberator now
[ypp-sc-tools.web-live.git]
/
pctb
/
yppsc-ppmlookup
1
#!/bin/sh
2
set -ex
3
4
needle=$(pnmnoraw)
5
6
exec 3<database.ppm
7
8
while true; do
9
read <&3 title
10
if [ x"$title" = x. ]; then
11
exit 0
12
fi
13
straw=$(pnmnoraw <&3)
14
if [ x"$straw" = x"$needle" ]; then
15
printf "%s\n" "$title"
16
exit 0
17
fi
18
done