6

tcsh - understanding difference between "echo string" and "echo string > /dev/stdout"

view full story
linux-howto

http://www.unix.com – I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here. I have following script (called out_to_streams.csh): Code: #!/bin/tcsh -f echo Redirected to STDOUT > /dev/stdout echo Redirected to STDERR > /dev/stderr echo Should default to STDOUT without redirection When I pipe the output like this: Code: ./out_to_streams.csh | vim - I get "Redirect to STDOUT" and "Should default to STDOUT without redirection" being piped. When I redirect to a file: Code: (HowTos)