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:40

PROTIP: find works recursively.

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