Try a test version that looks for more than one string. You'll have to run grep 50 times to find 50 strings, while a regexp loop will search each line for all 50.
The regexp loop should scale better for large numbers of regexps, too. Iterating a loop and searching for a pattern match are relatively fast, compared to reading information from the disk or spawning a subshell.
In reply to Re: Re: some forking help
by mstone
in thread some forking help
by JohnATmbd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |