Mercurial > hg > mauch-mirex-2010
diff common_startstring.sh @ 0:4182672fd6f8
Initial commit of files from the mauch-MIREX directory on octave
author | Chris Cannam |
---|---|
date | Tue, 24 Apr 2012 11:52:05 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common_startstring.sh Tue Apr 24 11:52:05 2012 +0100 @@ -0,0 +1,10 @@ +#!/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"