You will need to use scripts to share your scripts (or parts of scripts) with other jenkins jobs. It would be better not to enter the contents of the shell script inside the build job and just use the source control. You can call the script with each project from the control source or use copy artifacts , and in the shell build step execute the script command.
If you cannot do this, you will have to write a script that looks for the newly created script shell in your TEMP directory and copy it into the workspace of your next job. It sounds more like a waste of time than copying and pasting.
With source control, if you make one change to the script, it will be changed everywhere.
Practice a safe script!
Cole9350
source share