#!/bin/csh foreach d (result/*) foreach f ($d/*.gda) sed "s/ rel=/ opr=/g" $f > tmp \mv tmp $f end end