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

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


#!/bin/rc

rfork e

fn usage {
	echo usage: `{basename $0} [-l] person@machine  >[1=2]
	exit usage
}

lflag=()
while(! ~ $#* 0 && ~ $1 -*) {
	switch ($1) {
	case -l
		lflag=1
	case -*
		usage
	}
	shift
}

if (! ~ $#* 1)
	usage

x=`{echo $1 | awk -F '@' '{ print $1" " $2}'}
switch($#x){
case 1
	machine=$x
case 2
	person=$x(1)
	machine=$x(2)
case *
	usage
}

{
	echo -n $person
	if (~ $lfag 1)
		echo -n ' /W '
	echo
} | con -nrl tcp!$machine!finger

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.