faster bash operations on files with File Descriptors.
I was writing a bash script that would do some operations and read and write to file. Seems that that was pretty simple with
1
2 3 4 5 |
and then use redirection operations like “>” and “»” to write to file. Done with the script pretty fast. So far so good, when I went for real life tests, no one was interested in using it, why? Simple, it was simply taking too long. The file was reading about 10K lines and writing about 50 lines and was taking about more than 10 minutes.
Continue reading