How to Merge Files Without Using Merge

I use a Mac almost exclusively for development. Mac doesn’t come with the Linux merge command and sometimes I need to merge text files. It’s pretty easy to do using diff and grep. I’m going to show you how to merge the changes from two files into one. I’ll use file1, file2, file3 and file4