I have a text file and I need to process it according to some rules. To accomplish the task I can use multiple ways. For example I can use the linux command cut, paste, sed, awk etc. There are multiple ways to write the command used by a single utility. I want to know how can I test which choice is better. Thanks.

  • 3
    Note that for benchmarking purposes you probably better redirect the output to /dev/null in order to avoid the pure text processing performances from being contaminated with the displaying of text, which in some cases is the main time-consuming part of the processing and is more sensitive to resources availability. – Skippy le Grand Gourou Sep 8 '16 at 9:25

Have a look at time. That should give you all the information you need.

  • Thank you! A few minutes after I posted my question I found this time utility. I'll take a look. – Just a learner Sep 8 '16 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.