#!/bin/bash
filelist="$1"
common_st="`head -n 1 "$filelist"`"first

while read f; do
	diff_pos=`./diff_position.sh "$common_st" "$f"`
	last_same=$(( $diff_pos-1 ))
	common_st="`echo "$common_st" | cut -c 1-$last_same`"
done < "$filelist"
echo "$common_st"
