With bash I can run:
$ ssh bashuser@localhost '( ls -d / nosuchfile ) & echo foo; wait'
foo
ls: cannot access nosuchfile: No such file or directory
/
If I try the same with csh I get:
$ ssh cshuser@localhost '( ls -d / nosuchfile ) & echo foo; wait'
[1] 187253
foo
ls: cannot access nosuchfile: No such file or directory
/
[1] Exit 2 ( ls -d / nosuchfile )
I would like to get the same output as bash. How do I avoid the [1] PID and [1] Exit ...? Can I somehow put csh in quiet mode?
The ls and echo foo are of course only examples. In reality they will be much more complex and will depend on being run under the login shell and I will need stdout and stderr, so a simple grep -v of the output will not work.