I am looking for a bash or sed script (preferably a one-liner) with which I can insert a new line character after a fixed number of characters in huge text file.
This might work for you:
echo aaaaaaaaaaaaaaaaaaaax | sed 's/./&\n/20' aaaaaaaaaaaaaaaaaaaa x