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 ...
There are a few possible answers to this, but in the particular case where one shell script calls another program or script at the end, the answer is easy. Use exec: #!/bin/bash # Do stuff here ... # ...