Here's the problem:
I want to trap the results of an ls command in a C-shell variable
without having stderr sent to my terminal session.
set checked_out_files=`ls SCCS/p.*`
if ($#checked_out_files > 0) then
This functions in the way I want, except a "No Match" error is sent to
the terminal when there are no p.* files in the SCCS directory. I don't
want the user to see the error.
I've tried the following as a replacement for the "set" above, but
this does not trap stdout.
set checked_out_files=`(ls SCCS/p.* > /dev/tty) >& /dev/null`
I've solved my problem using sccs info, but I still want to know
how I would trap the results of a shell command into a shell variable
without directing stderr to the display. (I don't want the user to see
the errors at run time.)
__| o |__
Douglas Parker | Computer Sciences Corporation /_/-----\_\
teemc!gdls!parker | Come home. (Isn't English wonderful!) :-( \_\-----/_/