1834149 Members
3848 Online
110064 Solutions
New Discussion

in/output redirection

 
J.G.M. de Natris
New Member

in/output redirection

why is stderr not correctly mapped in below examples:
ehvux11$ csh -c "ftp -n ehvux11 fout"
ftp: connect: Connection refused
ehvux11$ cat fout
Not connected.
Not connected.
Not connected.
Not connected.
ehvux11$ ksh -c "ftp -n ehvux11 fout"
Login incorrect.
Login failed.
Please login with USER and PASS.
Please login with USER and PASS.
Please login with USER and PASS.
ehvux11$ ls
2 REPLIES 2
Tom Danzig
Honored Contributor

Re: in/output redirection

Don't use csh. Redirection in general stinks with csh. I used to be a die hard csh fan and had to relearn shell altogether to utilize posix and ksh when I realized that csh wasn't any good.

See http://www.grymoire.com/Unix/CshTop10.txt
J.G.M. de Natris
New Member

Re: in/output redirection

seems stderr (2) is not mapped correctly with the ksh and ftp when I do an ls zzz 2> fout it reports correct I would expect that the ftp message Login incorrrect is also redirected to 2.