#!/bin/sh

for a in *;
  do
  cp "$a" ../workspace/graph1.gw
  for b in *;
    do
    cp "$b" ../workspace/graph2.gw
    cd ../workspace
    /home/g-2007/hori/hougen/program/tree-dis-2 >> result-tree-distance.txt
    cd ../gw
  done
done

(ls -l * | awk '{print $9}')  > ../workspace/filename

cd ../workspace
/home/g-2007/hori/hougen/program/matrix
