.project & .plan (finger) What are they?

Jonathan I. Kamens jik at athena.mit.edu
Wed May 1 17:31:37 AEST 1991


In article <61 at uis-oc.UUCP>, vic at uis-oc.UUCP (Victor Torres) writes:
|> [What are .project and .plan, and which programs reference them?]

  At this point, .project and .plan are simply two files that "finger"
displays when someone fingers you.  .plan can have as much text as you want in
it, and .project is supposed to be one line long.  Also, some versions of
finger will look for the string %MENTION-MAIL% in the .plan file, and mention
whether or not you have unread mail if it's there.

  Besides the fact that finger looks at them, there's nothing special about
them, and (as far as I know) no other programs look at them.

|> [How to pcat files in a directory tree and grep through them, displaying
|>  the filenames on lines that match.]

  I have a script "zfiles" that looks like this:

	#!/bin/csh -f

	set sed = /bin/sed
	set zcat = /usr/ucb/zcat

	foreach file ($argv[2*])
		$zcat $file | $argv[1] | $sed 's&^&'"$file"':&'
	end

Using a script like this, and assuming you have "xargs" (if you don't, there
are freely redistributable versions available on the net) you can do
something like:

	find /usr/catman -type f -print | xargs zfiles "grep project"

In other words, there is no way to tell find to only print the filenames that
grep finds matches for, so you've got to generate the filenames with find, and
then use something else to do the searching through them and printing
filenames where appropriate.

  Something you have to watch out for when searching through man pages is that
many of the keywords are underlined, and "grep" won't find them.  For example,
the word "project" in a man page may appear as "_^Hp_^Hr_^Ho_^Hj_^He_^Hc_^Ht",
which grep won't locate when you tell it to search for "project".  You could
probably get around this by changing "grep project" to "col -b | grep project"
in the command I included above.

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710



More information about the Comp.unix.questions mailing list