HDTenEightyP/NetNews huggingface dataset:
Newsgroups: comp.unix.shell
Subject: read hangs in zsh.
From: oleg@csufres.CSUFresno.EDU (Oleg Kibirev)
Date: 12 Nov 92 21:20:54 PST
Distribution: world
Organization: California State University, Fresno

Is this a known problem or am I missing something? The following completely
hangs zsh 2.2.0 - it will even manage to ignore SIGHUP and SIGABRT:

gd:~> read foo bar baz
a

Note that if I change  "a" to "a  b", it works  fine. Does anyone  knows a way
around  this  bug. Or better   yet, can suggest  how  I can  avoid this   read
alltogether in my .zprofile. The following script  is  supposed to set DISPLAY
environment variable for me automatically when I login from X. It also chooses
X defaults depending on weather  the server has  color display. After klunging
above bug by adding garbage to input for read, it works fine but too slow. Any
suggestions? -- Thanks!

Oleg

resolve() # Finger will strip long hostname, so I have to fix domain.
{
        IFS='.:         ' read host dom misc
        if ( [ "$dom" = "cs" ] ) {
          echo ${host}.cs.CSUFresno.EDU:0.0
        } else {
          echo ${host}.CSUFresno.EDU:0.0
        }
}

if( [ \( .$TERM = .network \) -o \( .$TERM = .unknown \) -o \( .$TERM = . \) ]
) {
  export TERM=vt100
  stty rows 42 cols 132
} elif ( [ .$DISPLAY = . ] ) {
  export DISPLAY=`finger -swf oleg | awk 'NF == 5 {printf("%s.cs.CSUFresno.EDU\n",$NF) ;exit}' | resolve`
}

if( [ .`fgrep -i "$DISPLAY" ~/.color` != . ] ) {
        export XENVIRONMENT=.Xdefaults.color
} else {
        export XENVIRONMENT=.Xdefaults
}

unfunction resolve
newfrom
biff y
trap "clear; /usr/games/fortune; exit" 0
From: friedman@gnu.ai.mit.edu (Noah Friedman)
Newsgroups: comp.unix.shell
Subject: Re: Bourne Shell Programming Considered Harmful
Date: 5 Nov 92 18:13:03
Organization: Free Software Foundation, 675 Mass Ave. Cambridge, MA 02139
	<mjr.720938180@ursa>
NNTP-Posting-Host: nutrimat.gnu.ai.mit.edu
In-reply-to: mjr@ursa.calvin.edu's message of 5 Nov 92 04:36:20 GMT

In article <mjr.720938180@ursa> mjr@ursa.calvin.edu (Matt Ranney) writes:
>I love bash, but the man page isn't much friendlier.

   The bash man page is temporary.  A manual which is more consistent with
the style for GNU documentation is in the works (a draft of this manual is
in the bash distribution, I think.)
From: micah@carson.u.washington.edu (Micah Anderson)
Newsgroups: comp.unix.shell
Subject: how to tell if command outputs or not
Summary: how do I do this?
Keywords: if, messages
Date: 8 Nov 92 01:48:59 GMT
Article-I.D.: u.1992Nov8.014859.2937
Organization: University of Washington

if messages /usr/spool/mail/$USER
then echo "yes"
else echo "no"
fi
exit 0

what I want that to do is if the command messages /usr/spool/mail/$USER
outputs anything then echo yes, but if it doesnt output anything,
then output no...

what would the syntax for this be?
Newsgroups: comp.unix.shell
From: hwai@netcom.com (Howard Wai)
Subject: How to specify new line char. in SED?
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Fri, 13 Nov 1992 00:45:38 GMT


How do I specified a match of zero or more lines in a regular expresion? 
Or How do I specify a new line character? 

Here's an example:

case #1:
   int DBItest(a,b,c)
   int a;
   char b;
   long c;
   {
    /* body of function */
   }
 
case #2:
   int DBItest( a,
                b,
                c)
    int a;
    char b;
    char c;
   {
    /* body of function */
   }

I want to extract everything between the keyword "int" and "{" which
can be on different lines as in case #2.
I was able to take care of case #1 with the following sed command.
   sed -n "/^int.*(.*) */,/^{/p"  filename1

Output is:
   int DBItest(a,b,c)
   int a;
   char b;
   long c;
   {

What can I do about case #2?

Thank you in advance!
Newsgroups: comp.unix.shell
From: andyr@wizzy.com (Andy Rabagliati)
Subject: How do I know who I have su'ed to ?
Organization: W. Z. I.
Date: Sun, 8 Nov 1992 19:02:56 GMT

I want to know if I have su'ed to another account (especially root) in
one of my windows, by changing the prompt.

I am using ksh.  (please, no suggestions like ``but, in [czx]sh ...'')

I have the following setup at the moment, which works. However, it seems
clumsy and roundabout, and, ever eager to learn :) I want to know if
there is a Better Way.

The problem, as I see it, is that when I have su'ed, there is nothing
that has changed in my environment, even $USER. So, I have to do an
explicit USER= before invoking su.

Cheers,   Andy.

I have this in .profile :-

ENV=~andyr/.kshrc

here is my .kshrc :-

if [ ?$PS1 ] ; then {						# interactive

    if   [ $USER = root  ] ; then PS1='$PWD#\ ';		 # prompt pwd 
    elif [ $USER = andyr ] ; then PS1='${PWD#$HOME}>\ ';	 # prompt pwd 
    else			  PS1='$PWD%\ '; fi
    su()    {
		if   [ $# -ne 1 ]; then echo "Use su <account>";
		else USER=$1 /bin/su $1; fi
	    }
}; fi

-- 
andyr@wizzy.com  Andy Rabagliati, RR1 Box 33, Wyalusing, PA 18853 (717)746-7780
Newsgroups: comp.unix.shell,comp.unix.sysv386
From: alan@ernest.itg.ti.com (Alan Edmonds)
Subject: Re: Does *anyone* know of a GOOD shell  for Sysv 3.2? (w command line editing)?
Organization: Texas Instruments, Inc. - Plano, Tx
Date: Thu, 12 Nov 1992 20:10:45 GMT

In article <1992Nov12.163232.28505@mintaka.lcs.mit.edu> feoh@hal.gnu.ai.mit.edu (Chris Patti) writes:
>Does anyone know of such a good, *STABLE* shell for System V 3.2 (preferably
>one that will be able to compile across AT&T SysV 3.2, SCO, and ISC 3.2 derived
>systems.)

I'm using tcsh.  The only problem I have with it is sz/rz has stopped
working.  It has something to do with tcsh not giving up the /dev/tty device.

Minor annoyance.  Works real well for me.  I'm not sure you would want 
roots shell as tcsh.    I'm using it on ISC 2.2.1 and SunOS 4.1.x.

Should be available via archie, or drop me a line.

-- 
Alan Edmonds                                     Texas Instruments, Inc.
I don't speak for TI; TI doesn't speak for me    M/S 8515
Work phone: (214)575-6427                        6620 Chase Oaks Blvd.
Email: edmonds@lobby.ti.com                      Plano, Texas  75023
Newsgroups: comp.unix.shell,comp.unix.sysv386
From: feoh@hal.gnu.ai.mit.edu (Chris Patti)
Subject: Does *anyone* know of a GOOD shell  for Sysv 3.2? (w command line editing)?
Organization: MIT Laboratory for Computer Science
Date: Thu, 12 Nov 1992 16:32:32 GMT

Hello. I use/administer a number of PC based System V 3.2 systems, and the 
standard Bourne shell is driving me mad with its lack of command line editing
capabilities..

I have and use BASH, but it has a number of fatal bugs that have caused my
boss to decree "BASH doesn't work." (the most major of which is this: if you
hit the BREAK key more than once, the shell doesn't insert newlines between
prompts, and all keyboard input is lost.)  Repeated posts to gnu.bash.bug have
proved un-successful, so unfortunately I'm going to have to give up on BASH and
hope that there's something else with command line editing out there..

Does anyone know of such a good, *STABLE* shell for System V 3.2 (preferably
one that will be able to compile across AT&T SysV 3.2, SCO, and ISC 3.2 derived
systems.)

Thanks,
Chris Patti
feoh@gnu.ai.mit.edu
chrisp@ncm.interlan.com
From: sinclair@dcs.glasgow.ac.uk (Duncan Sinclair)
Newsgroups: comp.unix.shell
Subject: Re: How to quote '~' in Zsh?
Date: 10 Nov 92 12:13:19 GMT
Organization: Glasgow University Computing Science Dept.

chet@odin.ins.cwru.edu (Chet Ramey) writes:

>>'~' and "~" also expands to my homedir.

>This is, in my opinion, a bug.  At least one of them should serve
>to inhibit tilde expansion.  Posix.2 says both should work.  (Yes,
>I realize that zsh does not implement Posix.2.)

It's only a bug if it's true.  I don't see this behaviour
in the zsh I use.  (Straight 2.2.0, from comp.sources.misc)

e.g.
% grep "~" .zshrc
...
fignore=(.hi .o \~)
...



-- 
Duncan Sinclair  |  sinclair@dcs.gla.ac.uk  |  sinclair@uk.ac.gla.dcs
           ---  Rave Culture: Don't techno for an answer.  ---
From: barnett@grymoire.crd.ge.com (Bruce Barnett)
Newsgroups: comp.unix.shell
Subject: Re: The Problem with UNIX
Date: 13 Nov 92 14:57:38 GMT
	<1992Nov10.094408.21741@prl.dec.com> <362@unbc.edu>
Reply-To: barnett@crdgw1.ge.com
Followup-To: comp.unix.shell
Organization: GE Corp. R & D, Schenectady, NY

In article <362@unbc.edu> lyndon@unbc.edu (Lyndon Nerenberg) writes:

>   I'm not very familiar with Plan 9. How does rc address the problems the
>   original poster detailed?

Plan 9 does not support dumb (ASCII) terminals. It assumes the
intelligence is in the terminal (i.e. a workstation) which handles
editing locally. Therefore the shell does not have to provide
mouse-driven command line editing because the terminal does it for the shell.
--
Bruce Barnett <barnett@crd.ge.com> uunet!crdgw1!barnett
Newsgroups: comp.unix.shell
From: htewari@cs.tcd.ie (Hitesh Tewari)
Subject: Excellent Book!!
Organization: Computer Science, Trinity College Dublin
Date: Wed, 11 Nov 1992 14:20:14 GMT

Hi,
	Just wanted to tell you all about an excellent book on shell
programming that I came across recently. The title is "UNIX Applications
Programming" (Mastering the Shell) by Ray Swartz. The book takes a very
indepth look at the various tools eg. sed, awk, sort, cut etc...
It also comes with very realistic examples and also gives an explanation
of most of the common diagnostic messages that a user may come across.
It caters for both the beginner and the experienced user. Just one point
to note is that it uses the Bourne shell as an example. Thats it.

Hitesh
Xref: sparky comp.unix.shell:4677 comp.unix.sysv386:16447
From: wadswort@babss.UUCP (John H. Wadsworth)
Newsgroups: comp.unix.shell,comp.unix.sysv386
Subject: Re: ... shell  for Sysv 3.2? (w command line editing)?
Date: 13 Nov 92 13:39:20 GMT
Followup-To: comp.unix.sysv386
Distribution: world
Organization: Bell Atlantic Business Systems Service Branford, Ct.

In article <BxMDDy.H5M@ernest.itg.ti.com> alan@ernest.itg.ti.com (Alan Edmonds) writes:
>In article <1992Nov12.163232.28505@mintaka.lcs.mit.edu> feoh@hal.gnu.ai.mit.edu (Chris Patti) writes:
>>Does anyone know of such a good, *STABLE* shell for System V 3.2 ..... 
>
>I'm using tcsh.  ..... 
I'll second tcsh. I run it on ISC 3.01 without problems. I installed 
it because I was never able to get 'set filec' to work on the stock csh.
With tcsh i get file/command name extention and correction as well as
command line editing. It also includes lots of other great features like 
auto-logout and system monitoring. As I remember it builds clean and easy.

John H. Wadsworth            BABSS           wadswort%babss.UUCP@cs.yale.edu
(800) 677-8549 voice    (203)481-0276 fax      {uunet,yale}!babss!wadswort
Newsgroups: comp.unix.shell,comp.lang.misc
From: minh@lis.rch.unimelb.edu.au (Minh Tran)
Subject: Re: Need script (awk/sed/...) to remove dashes and do initial caps
Organization: Computer Science, University of Melbourne, Australia
X-Newsreader: TIN [version 1.1 PL6]
Date: Fri, 6 Nov 1992 01:17:31 GMT

Mark Burhans (sasmob@chewy.unx.sas.com) wrote:
> 
>   Here is an awk script that seems to work for me:
> 
> ----Cut Here----
> {
>     for( f=1; f<=NF; f++ )
>     {
>         # 1.  Make first character Upper Case.
>         # 2.  Make rest of the word Lower Case.
> 
>         sub( substr($f,1,1), toupper( substr( $f, 1, 1)), $f );
>         sub( substr($f,2), tolower( substr($f,2)), $f );
> 
>         # If a '-' is found, get rid of it and make the next
>         # character Upper Case.
> 
>         while( (i=index( $f, "-" )) != 0 )
>         {
>             pattern = substr( $f, i, 2 );
>             sub( pattern, toupper(substr($f,i+1,1)), $f);
>         }
> 
>         # Output what you have.
> 
>         print $f
>     }
> }
> ----Cut Here----
> 
	
	This should work as well ...

{
	split($1, parts, "-") ;
	printf("%s%s", toupper(substr(parts[1],1,1)), tolower(substr(parts[1],2)));
	printf("%s%s\n", toupper(substr(parts[2],1,1)), tolower(substr(parts[2],2))) }

	---
	minh

--
|>	B\iochemistry                        Minh Tra/N                       <|
|>	 I\nformation     minh@lis.rch.unimelb.edu.a/U                        <|
|>	  S\ervice                     (03) 345-590/8                         <|
|>	   D\epartment         Melbourne, Australi/A                          <|
From: dla@se05 (Doug Acker)
Newsgroups: comp.unix.shell
Subject: Changing cntl-P in ksh
Date: 10 Nov 92 04:53:49 GMT
Organization: Western Geophysical Exploration Products

-- 
Douglas L.Acker                Western Geophysical Exploration Products
____    ____     ____          a division of Western Atlas International Inc.
\   \  /   /\   /   /\         A Litton / Dresser Company
 \   \/   /  \ /   /  \        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Newsgroups: comp.unix.shell
From: fish@daacdev1.stx.com
Subject: Re: How to redirect outputs from the command "time" into a file? 
Organization: Goddard Space Flight Center
Date: Thu, 5 Nov 1992 17:11:05 GMT

mt0lamg@convex1.tcs.tulane.edu (Louis X. Lee) writes:

>My first question is about saving outputs from the timing command
>"time" into a file. I tried "time a.out > a.time", but it did not
>work. How to capture the outputs into a file?
time puts its output on stderr (not noted in any man page i've
ever seen either) so:
time a.out 2>a.time

			fish
--
John R. Vanderpool                INTERNET: fish@daacdev1.stx.com
NASA/GSFC                         VOX: 301-513-1683                
Hughes/STX Corporation            FAX: 301-513-1608
"somehow seems strange and a little bit funny, to wander thirsty in the rain" pr
From: dattier@ddsw1.mcs.com (DWT)
Newsgroups: comp.unix.shell
Subject: Re: Variable substitution using Korn sh
Date: 7 Nov 92 21:42:58 GMT
Organization: Contributor Account at ddsw1, Chicago, Illinois  60657

kevinl@tisdec.tis.tandy.com wrote in <28300008@tisdec.tis.tandy.com>:

| dirnam=$(eval echo $"$variable")

As harmless as the echo is, it being built into the Korn shell, 

eval dirnam=\$$variable

looks cleaner in my opinion.  If $variable contains a legal variable name
(whose value in turn should be assigned to dirnam) it won't need any quoting.

David W. Tamkin   Box 59297   Northtown Station, Illinois  60659-0297
dattier@ddsw1.mcs.com    CompuServe: 73720,1570    MCI Mail: 426-1818
Newsgroups: comp.unix.shell,comp.unix.question
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: Changing a 1 line zsh script to sh,perl,csh or tcsh etc.
Originator: tchrist@pixel.convex.com
Date: Mon, 9 Nov 1992 14:46:05 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: Convex Computer Corporation, Colorado Springs, CO
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of lie6@midway.uchicago.edu:
:How would I write this in sh, or perl, or csh, or tcsh?
:
:#!/bin/zsh
:ARGV0='-tcsh                                    .' $1 $2 $3 $4

If I understand what you're doing (changing what ps sees):

    #!/usr/bin/perl
    $0 = "-tcsh                                      . @ARGV";

--tom
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist

    "* Unix is a footnote of AT&T Bell Laboratories."
                             --Barry Shein
Newsgroups: comp.unix.shell
From: denaumow@vela.acs.oakland.edu (David Naumowicz)
Subject: Re: ftp querry 
Organization: You mean that I belong to an organization??
Date: Mon, 9 Nov 1992 21:48:06 GMT

cs331333@umbc8.umbc.edu (cs331333) writes:

>	Does anyone now of a shell script that would allow me to
>continually query an ftp site for entrance.  Some sites only allow
>very limited access, 1 or 2 people, and I'd like a program that
>could just run along in the background.  Or one that I could
>contrab at 3 in the morning and have it look around, and get things
>that I select for the next night.  (Robocomm where are you? <grin>)

There is a program called batchftp for unix systems.  With it you may
list the files you want (or which directories you want the contents of
for more specific selection later.) and have it execute in the
background.  It will keep trying the site at odd intervals (to prevent
2 copies from syncing) until it makes it through.  It will then get
the files/info.  It is very good.

I origonally found it at Simtel (quite awhile ago, actually). but 
have since what it was origionally stored as (or even in which
directory...)  You might want to use archie to try to locate it...

I hope this helps...

Dave

--
"Just think...If hell really DID freeze    ...David Naumowicz
 over...Imagine all the promises people    denaumow@vela.acs.oakland.edu
 would have to keep..."                    denaumow@argo.acs.oakland.edu
	      -Shadow Thief on ISCA-bbs
Newsgroups: comp.unix.shell,comp.mail.misc
From: davidf@mks.com (David J. Fiander)
Subject: Re: How to interpret when the end of piece of mail is reached?
Followup-To: comp.mail.misc
Organization: Mortice Kern Systems Inc., Waterloo, Ontario, CANADA
Date: Tue, 10 Nov 1992 12:48:24 GMT

Followup's to comp.mail.misc
According to boyd@prl.dec.com (Boyd Roberts):
>
>Don't even think of following up with some theory that is based around
>four control-A's.  Only brain-damaged user agents do that.
>

Of course you meant "transfer agents" in that sentence, since a
user agent can only work with what the TA gives it.

The best format for a mailbox is a directory of files, each of
which contains a single message (wow!  something that VM/CMS
got right!).

- David
From: fyl@ssc.com (Phil Hughes)
Newsgroups: comp.unix.shell
Subject: Re: Bourne shell references?
Date: 11 Nov 92 20:07:17 GMT
Article-I.D.: ssc.1992Nov11.200717.14723
Distribution: usa
Organization: SSC, Inc.,  Seattle, WA
X-Newsreader: TIN [version 1.1 PL6]

Jason L Tibbitts III (tibbs@math.uh.edu) wrote:
: Is there a Bourne shell reference thingy similar to the VI reference that
: is floating around?  How about a programming guide?  The man page really
: doesn't fit the bill for either of these.  (SunOS 4.1.3)

Was that the VI reference by SSC?  SSC (where I work) publishes a whole
series of pocket-sized references and tutorials.  The Bourne Shell
Tutorial is a 50 page book (8-1/2" x 3-1/2") that has both reference
information on sh and tutorial info which explains the shell and includes
examples.  They are $6 each plus postage.

You can request information on these products or a copy of our catalog by
calling or sending e-mail to sales@ssc.com


-- 
Phil Hughes, SSC, Inc. P.O. Box 55549, Seattle, WA 98155  (206)FOR-UNIX
>>> Publishers of pocket references for UNIX, C, VI, Emacs, Ksh, MS-DOS, ... <<<
     ...!ssc!fyl or fyl@ssc.com            (206)527-3385
Newsgroups: comp.unix.shell
From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
Subject: Re: Variable substitution using Korn shell
Keywords: KORN Variables
Organization: Motorola Codex, Canton, Massachusetts
Date: Thu, 5 Nov 1992 18:36:12 GMT

eginsber@oracle.com (Eric Ginsberg) writes:

>In article <140617@lll-winken.LLNL.GOV>, 946753@arniew.llnl.gov (Arnie Weinstein) writes:
>>  I have a global variable named  ASCOM.
>>  ASCOM=/home/aisserver1/people/946753
>>   The following is the script which reads from standard input the variable
>> dirnam.  Then it test to see if the the contents of dirnam is a directory.  If I
>> enter the full file name manually it works fine, however if I use $ASCOM it does
>> not work.  Instead of substituting the value of $dirname it uses $ASCOM.  If the
>> value of dirnam comes from an input parameter $1 it evalutes the content of $1
>> proprely.  How do I get dirnam to contain the value of $ASCOM not to contain the
>> charaters '$ASCOM'   ????? 
>> 
>> *********************************************************************************
>>  read  dirnam
>>  if [[ -d $dirnam ]]
>>       then 
>>       print $dirnam' to be scanned'
>>    else
>>       print $dirnam' not found'
>>    fi
>> *********************************************************************************
>> 

>Don't feel bad, you're real close.  What you're missing is the eval. 
>Add this line in after the read dirnam
>dirnam=`eval echo $dirnam`

Or this line:

  eval dirname=$dirname

Michael.
Newsgroups: comp.unix.shell
From: root@trebor.uucp (Bob Stockler)
Subject: Re: Am I writing to a tty or pipe?
Organization: Bob Stockler
Date: Fri, 13 Nov 1992 23:27:24 GMT

eddjp@dinowine.huber.com (Dewey Paciaffi) writes:

>Is there a way to determine from within a Bourne shell script if
>the output is being written to a tty or a pipe?

If the script is written to perform as a filter (i.e.: gets input
from its standard input, writes to its standard output), or as a
program that does whatever it does and writes everything to its
standard output, I'd say "no" to the question.

It is a child (or subshell) of the shell that's executing it, and
is simply writing to its file descriptor #1, and the parent shell
is causing the output from the script to be, or not be, redirected
anywhere that has been specified by some mechanism in the parent.

There are ways, within a script, to assure how and where its output
should go (either one, or multiple directions) according to how it's
invoked, but I know of no way for a script to tell - outside of its
own internal redirections - where its output is going.
Newsgroups: comp.unix.shell
Subject: Re: How to quote '~' in Zsh?
From: oleg@csufres.CSUFresno.EDU (Oleg Kibirev)
Date: 12 Nov 92 20:55:05 PST
Organization: California State University, Fresno

In article <1dmha7INNni4@usenet.INS.CWRU.Edu> chet@odin.ins.cwru.edu (Chet Ramey) writes:
>>'~' and "~" also expands to my homedir.
>
>This is, in my opinion, a bug.  At least one of them should serve
>to inhibit tilde expansion.  Posix.2 says both should work.  (Yes,
>I realize that zsh does not implement Posix.2.)
>
gd:~> echo ~
/home/oleg
gd:~> echo "~"
~
gd:~> echo '~'
~
gd:~> echo \~
~

Maybe you don't have the latest version?
Oleg





Newsgroups: comp.unix.shell
From: dkeisen@leland.Stanford.EDU (Dave Eisen)
Subject: Re: C-Shell question
Organization: Sequoia Peripherals, Inc.
Distribution: na
Date: Sat, 7 Nov 92 18:35:12 GMT

In article <1992Nov6.113910.21207@ms.uky.edu> kherron@ms.uky.edu (Kenneth Herron) writes:
>
>As for Mr. Vidya and the others, it sounds like they didn't read your
>question closely enough and thought you were doing something like
>
>	#! /bin/csh
>	rsh foo /bin/rm file
>	if ( $status ) ...

(As opposed to rm -f)

No. Mr. Vidya and the others were right, the -f has nothing
at all to do with the functionaltiy of this script.

The script you wrote will always have $status set to 0, regardless
of whether or not file exists on foo (assuming you were successfully
able to execute the rm command on foo). The problem with this script
is that it depends on the exit status of rsh which will be 0 even
if the exit status of rm isn't.

The only way to find out if the rm worked is to do the following:

#! /bin/csh

   set stat = `rsh foo 'rm file >& /dev/null ; echo $status '`

   if ( $stat ) ....


-- 
Dave Eisen                               Sequoia Peripherals: (415) 967-5644
dkeisen@leland.Stanford.EDU              Home:                (415) 321-5154
       There's something in my library to offend everybody. 
          --- Washington Coalition Against Censorship