Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/src/cmd/mysqlfs/stk.rc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/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


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].