Select the command blocks you want to combine in MCEdit, then run the filter.
Important: In order to run properly, the command block must be powered directly for at least 3 ticks.