How to refresh screen while running c-shell script?

Lourdes Gallastegui lourdes at delgeo.nl
Tue May 28 18:32:47 AEST 1991


	Hello everybody.
I'm not a programmer so please excuse me if I don't use the right words
or my question is too silly.

When running a C Shell script based mostly on echo and set commands
I would like to be able to refresh the screen when write/mail messages
arrive in the middle of my interactive script session.

#! /bin/csh -f                           # This is the basic mechanism
start:                                   # of my script. The problem is
echo -n 'Tape number to allocate? '      # how do I get rid of text that
set number = $<                          # doesn't come from these echo's
ex tapeadm << stop >> tapes_report       # while running the script.
...                                      #
wq                                       # The purpose of the script is
stop                                     # to allow users to allocate or
echo -n 'You want to save your changes? '# release tapes from the project's
set ans = $<                             # library (~4000 tapes), instead 
...                                      # of using hand-written tape 
exit                                     # administration

I'm using a CONVEX machine, and our UNIX release is 9.0
I thought of doing control-z, then clear, then fg, but of course all my
echo's are gone and the user will be lost not knowing what question s/he's
answering to.

I've considered the possibility to "disable" the user so write/mail messages
don't arrive while running the script, but the same user can be logged in
in several tty's and I think this disabling works on user and not on tty.
Is that so?

Sure there are better ways to organize the tape administration of a single
project, but I've used the tools that I know, and that's not many...
(I'm familiar with awk and C-Shell, a bit of fortran, and that's it :-()

	Thanks in advance. E-mail is preferable.

	Lourdes
-- 
::::::::::::::: <lourdes at delgeo.nl> ::::::::::::::::
<lourdes at delgeo.uucp> or !uunet!hp4nl!delgeo!lourdes
::    Omnia probate, et quae bona sunt, tenete    ::                        



More information about the Comp.unix.questions mailing list