It depends on the quality of the sed implementation (and also the Perl version). I have seen cases where Perl was 2 to 5 times faster than either sed or awk (I don't remember for sure from which vendor), although this was more than 10 years ago. In the more recent tests I made (but with rather old OS), there was no significant difference and it would also depend on the complexity of the processing being applied.
I think that, in general, tests are required to decide the best way to go (if it matters at all, e.g. if your files to be processed are really so large that it will make a significant difference for you).
| [reply] [d/l] [select] |