#!/bin/bash

function ch {

  cat $1 | sed s/$2/$3/g > $1.new;
  mv $1.new $1;
}

for i  in *.*
do
echo $i;
ch $i "LinExpression" "Linear_Expression"
ch $i "GenSys" "Generator_System";
ch $i "ConSys" "Constraint_System";
ch $i "Integer" "Coefficient";
ch $i "Polyhedron::UNIVERSE" "UNIVERSE";
ch $i "Polyhedron::EMPTY" "EMPTY";
ch $i "remove_dimensions" "remove_space_dimensions";
ch $i "remove_higher_dimensions" "remove_higher_space_dimensions";
ch $i "add_dimensions_and_embed" "add_space_dimensions_and_embed";
ch $i "lpx_set_col_coef" "lpx_set_obj_coef"

#cat $i | sed s/LinExpression/Linear_Expression/g > $i.new;
#mv $i.new $i;
#cat $i | sed s/Polyhedron::UNIVERSE/UNIVERSE/g > $i.new;
#mv $i.new $i;
#cat $i | sed s/Polyhedron::EMPTY/EMPTY/g > $i.new;
#mv $i.new $i;
done
