Skip to content Accesskey=4Skip to sub-navigation Accesskey=3View our Accessibility Options MIT Information Systems Home About IS&T Contact IS&T Site Map Search Advanced Search
Getting StartedGetting Services by Topic or Alphabetically Getting Help

On This Page

[Help]

  

Quick Links

Top Level

Related Links

Ask OLC a question

Athena Consulting Homepage

Helpdesk Stock Answers (for Mac/PC questions)


Shell I/O and REDIRECTIONS

The standard input and standard output of a command may be redirected using
the special characters described below.

Use the file 'name' as the standard input:

	command < name

Use the file 'name' as the standard output:

	command > name
	command >& name

If the file does not exist then it is created; if the file exists, it is
truncated, its previous contents being lost.  You can use 'set noclobber' to
prevent yourself from doing this accidentally.

The form involving '&' routes the diagnostic (error) output, in
addition to the standard output, into the specified file.


Use the file 'name' as the standard output like `>', but append the output at
the end of the file.

	command >> name
	command >>& name

If you want to learn more about input and output redirection, you can read the
'csh' manual page by using the 'man' command:

	man csh

MIT Home | Getting Started | Getting Services | Getting Help | About IS&T | Accessibility
Ask a technology question or send a comment about this web page.