vfs: check userland buffers before reading them.
[haiku.git] / 3rdparty / mmu_man / scripts / bebook
blob74a8cd6940022eba017156704545dd151c4f509c
1 #!/bin/sh
3 if [ -z "$1" ]; then
4 echo "usage:"
5 echo "$0 search_term"
6 exit 0
7 fi
9 $(query -a '(BEOS:APP_SIG=="application/x-vnd.STertois.BeHappy")' | head -1) &
10 sleep 1
11 LASTWIN=$(hey BeHappy count Window | grep result | cut -d ' ' -f 7)
12 let LASTWIN="$LASTWIN - 1"
13 hey BeHappy set Book of Window $LASTWIN to "Be Book" > /dev/null
14 hey BeHappy set Topic of Window $LASTWIN to "$1" > /dev/null