Writing to file using bash redirection
Hello.
In this article, we are going to write to a file using a file descriptor.
Let's go!
The file we want to work with is animals.txt:
$ cat animals.txt
dog
horse
cow
chipmunk
First we have to tell bash to set up the redirection required.
$ exec 4>...
loganlee.hashnode.dev1 min read