If working with an external utility is appropriate I would choose busybox for Windows which is only one ~600 kB exe incorporating ~thirty Unix utilities. The one distinction is always that one particular need to use "busybox cat" command as an alternative to easy "cat" Crafting Do it yourself cat https://www.petskyonline.com/cat-toys/