in tcsh I'm trying to redirect STDERR from a command from my .aliases file.
I found that I can redirect STDERR from the command line like this.,.
$ (xemacs > /dev/tty) >& /dev/null
., but when I put this in my .aliases file, I get an alias loop.,.
$ cat .aliases
alias xemacs '(xemacs > /dev/tty ) >& /dev/null'
$ xemacs &
Alias loop.
$
., so I put a backslash in front of the command in .aliases, which allows the command to run.,.
$ cat .aliases
alias xemacs '(\xemacs > /dev/tty ) >& /dev/null'
$ xemacs &
[1] 17295
$
., but now I can not give the command any arguments:
$ xemacs foo.txt &
Badly placed ()'s.
[1] Done ( \xemacs > /dev/tty ) >& /dev/null
$
Can anyone suggest any solutions? Thank you in advance!
UPDATE: I'm still wondering if you can redirect STDERR to tcsh from .aliases, but as suggested here, I ended up with a shell script:
#!/bin/sh
/usr/bin/xemacs "$@" 2>/dev/null
pdiddy
source
share