Redirection can be defined as changing the way from where commands read input to where commands send output. You can redirect input and output of a command. Using characters like > , < , >> , |
standard input (stdin < ) : numbered as stdin (0). The bash shell takes input from stdin. By default keyboard as i/p.
standard output (stdout > ) :numbered as stdout (1). The bash shell sends output to stdout. Output goes to display.
standard error (stderr) : numbered as stderr (2). The bash shell sends an error message to stderr – goes to display
1 | > | echo “hii” > hii.txt |
2 | < | run.sh < new-commands.txt |
3 | >> | Network troubleshooting utility. |