9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rsc@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] anyone else notice this expecation
Date: Thu, 17 Apr 2003 12:50:17 -0400	[thread overview]
Message-ID: <55f9d653f7ca38791d3f057bba1110f3@plan9.bell-labs.com> (raw)
In-Reply-To: <8c9532684bfcf812c7b86fd2627f2e88@vitanuova.com>

i use this to clean up unnecessary windows.
it's a big hammer, but it does the job.

g% cat /bin/Clean
#!/bin/rc

rfork e

if(~ $#* 0)
	pattern=.
if not
	pattern=$1

cd /mnt/acme
for (i in [0-9]*){
	if(test -d $i){
		tag=`{cat $i/tag}
		tagline = $"tag
		file=$tag(1)

		# must match our pattern if given, must be a clean window,
		# and must not be an Errors window, mail, or win.

		if(! ~ $file */ *+Errors* */-* */mail/* && ! ~ $tagline *Put*
		&& echo $file | grep $pattern >/dev/null >[2]/dev/null)
			echo del >$i/ctl
	}
}
status=''
g%



  reply	other threads:[~2003-04-17 16:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-17 16:27 matt
2003-04-17 16:49 ` rog
2003-04-17 16:50   ` rsc [this message]
2003-04-17 17:20     ` rog
2003-04-18  0:36       ` okamoto
2003-04-20 19:33         ` rog
2003-04-20 19:51           ` Russ Cox
2003-04-22 11:31             ` rog
2003-04-22 13:10               ` matt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55f9d653f7ca38791d3f057bba1110f3@plan9.bell-labs.com \
    --to=rsc@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).