Plan 9 from Bell Labs’s /usr/web/sources/contrib/fgb/rc/contrib.index

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


#!/bin/rc

echo 'This is just an example of a script that edits the wiki.'
echo 'Do not run this script!'
exit 'no'

path=/bin

rfork n

# plan9.bell-labs is EST
cp /adm/timezone/US_Eastern /env/timezone

page=contrib
test -e /srv/wiki || srv 'net!plan9.bell-labs.com!wiki' wiki || exit
mount -c /srv/wiki /mnt/wiki
lastupdate=`{sed '/^D/q' < /mnt/wiki/$page/current | sed -n 's,^D,,p'}
contrib=/n/sources/contrib/
9fs sources
cd $contrib

#dirs=`{ls| sed 's/(9hist|9hist.tar.gz|alef.tgz|art|old|vga|mothra)//'}
dirs=`{echo $dirs|sed 's/ i//'}

fn author {
	tail -1 README |
	grep author |
	sed 's/@/ at /
		s/^author: //'
}

{
	echo Contrib
	echo D^$lastupdate
	echo A^$user
	echo contrib.index
	for(i in $dirs){
		cur = $contrib^$i
		cd $cur
		echo
		echo $cur | tr a-z A-Z
		echo
		author
		echo
		sed 's/^/	* /' < INDEX
		echo '!'
	}
	echo -n
} > /mnt/wiki/new

rm /srv/wiki
rm /srv/sources

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].