Este script faz o trabalho:
#!/bin/bash
# $1 : first gif
# $2 : second gif
mkdir first
cd first
convert $1 x%04d.gif
cd ..
mkdir second
cd second
convert $2 x%04d.gif
cd ..
for filename in first/*
do
filename='basename $filename'
montage -tile 2x1 -geometry 512x512 first/$filename second/$filename concat$filename
done
convert concat* output.gif
rm -rf first
rm -rf second
rm concat*