#!/bin/rc
rfork en
part=$1
if(~ $#part 0)
part=''
mnt=/n/phonebook
mysqlfs -k 'user=stock' -m $mnt stock
query='
SELECT
item as Item,
qoh as Stock,
qoo as Orderd,
cost as Cost,
status as Status,
descr as Description
FROM mfg
WHERE descr
LIKE ''%'^$part^'%''
'
{
d=$mnt^/^`{cat}
echo headings > $d/ctl
echo use stock > $d/ctl
echo $query > $d/query
cat $d/data
} < $mnt^/clone
|