#!/bin/csh -f
#(ie run the cshell on this but don't read the .cshrc)

# atc: atchange the $1 and label the window at the same time
# version = 1.02 of atc 2002 May 6
# origin before 1997 jan 2

# Dr. Thomas D. Schneider
# National Cancer Institute
# Laboratory of Experimental and Computational Biology
# Frederick, Maryland  21702-1201
# toms@ncifcrf.gov
# permanent email: toms@alum.mit.edu
# http://www.lecb.ncifcrf.gov/~toms/

set q = `pwd | sed -e "s|/|@|g"| tr '@' '\012'| tail -1`

switch ($#argv)
  case 1:

    nw "--------------"
    nw
    nw "--------------"
    nw
    nw "--------------"

    nw "$q $1"
    echo ""
    echo "$q $1"
    atchange $1

  breaksw

  case 2:

    nw "=============="
    nw
    nw "=============="
    nw
    nw "=============="

    nw "$q $1>clear;$2"
    echo "$q $1>clear;$2"
    atchange $1 "clear; $2"

  breaksw
  default:
     echo "usage: atc [at change file] [function to do]"
  breaksw
endsw
