Skip to content
masterclass Buddy

Linux & Shell · Concept

Redirection

Bash redirection controls command file descriptors. It can connect input and output to files or pipes, copy descriptors, and close them. The exec builtin applies descriptor changes to the current shell or replaces the shell with a command.

Last updated

Syntax

exec [ command [ argument ... ] ]
exec [redirection ...]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • exec
  • |
  • |&
  • pipefail
  • file descriptor
  • standard input
  • standard output
  • standard error

Source: bash(1) - Linux manual page. Checked 2026-11-03.