File descriptor bash

In this article let’s discuss about File descriptor bash. Let’s go through the following methods without any delay.

Method 1:

When bash starts it opens the three standard file descriptors: 
- stdin (file descriptor 0)
- stdout (file descriptor 1)
- stderr (file descriptor 2)

Can use these sometimes explicityly
$ echo hello > file.txt
$ echo hello 2> file.txt

(file descriptor before >)

Hope the above solution works.

Realted Posts : How to show weather top bar in ubuntu