Linux Bash Scripting Tutorial


IO Redirections

There are always 3 different files are open, stdin(keyboard), stdout(the screen) and stderr(error messages output to the screen) Readirection means caputuring output from a file, command, program, script or from code block. and sending it as output to another program,script or command. each open file gets a file descriptor

  • stdin 0
  • stdout 1
  • stderr 2
file descriptor can range from 3 to 9

ADS