Browse this site (look for posts with negative scores)
and you'll see some examples of horrible shell scripts,
doing things like reading a file one line at a time
and then echoing each line into a program
that could have just handled the entire file.
Naturally a script like that will run slowly.
But, if there is an existing program (or a small group of programs)
that do exactly what you want, without too much baggage,
then you can probably write a script very quickly
that will run faster than any C program you can write,
without a serious development effort.
A lot of time and energy has been invested
in making some of the GNU/Linux programs very efficient.
For example, under some conditions,
grep doesn't need to look at every character of its input.
Will the program you write be that clever?