in reply to Myth busted: Shell isn't always faster than Perl
But the above was wrong, so I rewrote a "correct" perl version :grep "^function" *.4gl | sed "s/\(.*\):function \(.*\)(.*/\2 \1 \/^function \2(/"
I rewrote the new perl version in shell (grep/sed) for kicks, and it was slower than the perl version (and much uglier)./^\s*function\s+(\w+)\s*\(/i # and then use hashes to save data so there's no s///
|
|---|