#!/bin/bash
rm substates.dat
touch substates.dat

echo -e "1 2 3 4 5 BI BII" >> substates.dat


echo " /////////////////////////////////////////////// "
echo " ///// Extracting SUBSTATES data /////////////// "
echo " /////////////////////////////////////////////// "

for i in {1..18}
do
  cd $i.basepair
  value=$(grep '24)   M  W' $i.cn_out.lis)
  cd ..
  echo $i $value
  
done >> "substates.dat"