Output Redirection
Last updated
What is Output Redirection?
Output redirection in shell scripting allows you to control where the output of a command is sent. Instead of displaying on the terminal, you can redirect it to a file, either overwriting the file or appending to it. This is achieved using special operators like >, >>, 2>, and &>. These operators provide a way to manage standard output (stdout), standard error (stderr), and both, making it easier to process and store command results.
Free resources to learn Output Redirection
More in stage 8: Bash Alias
Output Redirection: common questions
Can I learn Output Redirection in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Output Redirection in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this Output Redirection tutorial for beginners?
It is lesson 21 of 166 in the free Shell / Bash roadmap, in stage 8, Bash Alias. If you are new to Shell / Bash, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.