Applying diff output to create new script

I believe I read somewhere that you can do a diff of two ksh scripts and use the output to create a new script with the differences. :stuck_out_tongue:

Could someone please show me the command(s) I'd need to use to get this accomplished? Or perhaps point me to a thread that explains this in detail.

Thanks in advance for your help.

The typical steps of patch creation and application is

diff -Nau a.txt b.txt > a_b_delta.patch
Ship this patch to some other destination with a.txt
cd /destination/dir
patch -p0 < a_b_delta.patch

These are the steps I usually take. Of course variations are possible.