The printf command offers well-defined behavior following the POSIX standard, which means it works the same way across shells ...
You need to package up a bunch of files, send them somewhere, and do something with them at the destination. It isn’t an uncommon scenario. The obvious answer is to create an archive — a zip or tar ...