In general, a script isn't as efficient as a custom-written C or C++ program, because it:

  • is interpreted, not compiled
  • does most of its work by running other programs

However, developing a script can take less time than writing a program, especially if you use pipes and existing utilities as building blocks in your script.