I have n files, like:
file1:
1aaa 2eee Test XXX Hanna Lars
file2:
1fff 2ffffd 3zzz Test XXX Mike Charly
This should work for you:
sed -i '1,/Test XXX/d' file1 sed -i '1,/Test XXX/d' file2
or simply
sed -i '1,/Test XXX/d' file*