1.

What is Input/output Redirection?

Answer»

By default, the standard INPUT device is Keyboard and the standard output device is a Display screen. But to automate the processes or to pass the output of one PROCESS to another process these standard ways does not work. Linux feature of DIRECTING input & outputs data to and from processes is called Input/Output Redirection. Input / Output redirection is a required feature for good programming and shell scripting. It’s used for taking input and showing results as per requirement. Input from USER and passing to other process is called input redirection WHEREAS if process further pass its output to another process or function that will be output redirection for that and input redirection for receiving one.

In Linux, we have three redirections available as below: -

  • Input Redirection: ‘<’ symbol is used for input redirection to the new process.
  • Output Redirection: ‘>’ symbol is used for output redirection to a new process or log file.
  • Error Redirection: It is denoted as STDERR(2). This is very useful for error handling.


Discussion

No Comment Found