From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <55f9d653f7ca38791d3f057bba1110f3@plan9.bell-labs.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] anyone else notice this expecation From: rsc@plan9.bell-labs.com In-Reply-To: <8c9532684bfcf812c7b86fd2627f2e88@vitanuova.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Thu, 17 Apr 2003 12:50:17 -0400 Topicbox-Message-UUID: 91e0d87c-eacb-11e9-9e20-41e7f4b1d025 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%