On Monday 01 March 2004 13:20, Kohn Emil Dan wrote:
> On Mon, 1 Mar 2004, Orna Agmon wrote:
> > How do you redirect only Error in tcsh?

This isn't really possible in csh/tcsh (one of the ~30 reasons not to
write scripts in csh/tcsh).

> ( command > /dev/null ) >& file
> 
> Now ain't that cute? ;-)

An old trick, but not really equivalent. You *eliminated* stdout and then
redirected *both* to the file. Try to redirect only stderr without touching
stdout and you'll see what I mean.

if you think about:
   (command > /dev/tty) >& file

This won't help if stdout should continue to some other place (like a pipe).

BTW: I'm not trying to bash (pun intended :-) tcsh. I use tcsh as my default
interactive shell. But "csh/tcsh why not" (as a scripting tool) is a very
old FAQ.

Now let's bash bash... Is there any interactive equivalent to tcsh 'ESC-p'
and 'ESC-n' (history-search-backward, history-search-forward)?
I don't look for bash "incremental search" (which is very good in itself), but
the feature that enables me *after* writing a command prefix to search for
this prefix in the history. E.g:
   prompt> viESC-p
would pull the last 'vi' command.

I think this feature is the only show-stopper to convert my login shell
to bash (since programmed completion is already well supported).

Thanks,

-- 
Oron Peled                             Voice/Fax: +972-4-8228492
[EMAIL PROTECTED]                  http://www.actcom.co.il/~oron

If Windows is the answer, you ask the wrong question


--------------------------------------------------------------------------
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]


Reply via email to