Clear screen while running C-shell script based on echo's

Clear screen while running C-shell script based on echo's

Post by Lourdes Gallasteg » Fri, 07 Jun 1991 18:25:45

        Hello everybody.
I'm not a programmer, 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
(the user gets consecutive questions to choose among several options
and the answers are redirected to awk, grep, ex, etc) I would like to
be able to refresh the screen when write/mail messages arrive in the
middle of my interactive script session.

I've thought of doing  mesg n  but I believe that root can still write
to my terminal after disabling myself in this way. Most messages would
come from root, so this is not a solution.

Changing the write permission of my /dev/tty would have the same
problem, and I'm not sure if it wouldn't mess it up.

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'm using a CONVEX machine, and our UNIX release is 9.0. My terminal is
a vt100n.

        Thanks in advance. E-mail is preferable.


# She that will not when she may, when she would she shall have nay #      


1. c-shell script won't run from korn-shell / SETUID


I have a C program called "tryme" which does a system call
to run a korn-shell script called "trythis.ksh".  This script
calls a C-shell script called "goforit".

My original program "tryme" runs SETUID as user "joe" so
the permissions on "tryme" look like this:

     -rwsr-x---  1 joe   sd   3083 Nov  9  19:06 tryme

The two scripts are executable by everybody.  When I run "tryme"
it calls "trythis.ksh" without problems, but when "trythis.ksh"
then calls the C-shell script "goforit", an error is produced

    "csh: The file access permissions do not allow the specified

When I turn off the SETUID permission from tryme and the rerun
it, everything works just fine.  Does anybody know why turning
on SETUID for tryme has an adverse affect on the c-shell script?


2. X-window & MS-mouse problem

3. How to refresh screen while running c-shell script?

4. When to release NetBSD 1.5.3?

5. Shell Script Help (C-Shell Script)

6. chat (ppp) not talking to modem

7. 'clear' does not clear screen

8. 10BaseT on 10/100BaseT 3Com

9. Help with shell script; 'tput clear' won't work!?!

10. Running a C-Shell Script

11. clear command - Clear does not clear my screen.

12. How to run rn in a c-shell script

13. How to do 'echo $0' in shell script ?