Linux shell redirect
In some situation, that we need to hide the output information of a
application, such goagent or some useful manual scripts.Thus redirect into a
blackhole is the best choice you can make.
Here I will introduce the representation of streams in linux bash programming:
- 0 :STDIN
- 1 :STDOUT
- 2 :STDERR
upon which we could use that number to redirect data or information into
Here is our example:
As we could see that,through
>, we could redirect the number represented
stream into another place.
If you want to redirect one stream into another stream, using
& to represent.
29 July 2013