Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Why is this so slow?

Name: Anonymous 2009-06-23 8:36

I have this script;

#!/bin/sh

find . -type f -exec sed -i -e "s/comes in/gets out/g" {} \;
find . -type f -exec sed -i -e "s/come in/get out/g" {} \;


It takes about 30 seconds to run while a simple [code]sed 's/comes in/gets out/g' -i *[code] takes about two seconds. Why's that?

Name: Anonymous 2009-06-23 8:51

why not just use s/come(s)? in/get\1 out/g?
works for me in perl

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List