Skip to main content
Post Made Community Wiki by don_crissti
Source Link
don_crissti
  • 85.7k
  • 31
  • 234
  • 262

Why not using the right tool for this job, i.e. grep:

grep -qxFf- file.txt <<\IN && printf %s\\n "String found. Do remaining steps"
#orb_plugins = ["local_log_stream", "iiop_profile", "giop", "iiop"];
IN

This stops reading the file as soon as a match is found. It's also (on average) about 100 times faster than your while read loop.