murge 630 B

1234567891011
  1. #!/bin/sh
  2. grep -A99999 '^<<<<<<<' | grep -B99999 '^>>>>>>>' >murge.X
  3. grep -A99999 '^====' murge.X | egrep -v '^(=======|<<<<<<<|>>>>>>>|\|\|\|\|\|\|\|)' >murge.theirs
  4. grep -B99999 '^||||' murge.X | egrep -v '^(=======|<<<<<<<|>>>>>>>|\|\|\|\|\|\|\|)' >murge.ours
  5. grep -B99999 '^====' murge.X | grep -A99999 '^||||' | egrep -v '^(=======|<<<<<<<|>>>>>>>|\|\|\|\|\|\|\|)' >murge.common
  6. colordiff -du $* murge.ours murge.theirs
  7. grep . murge.common > /dev/null && colordiff -du $* murge.common murge.theirs
  8. grep . murge.common > /dev/null && colordiff -du $* murge.common murge.ours
  9. rm murge.theirs murge.common murge.ours murge.X