This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Syntax for sed .. altered?

On 30/06/2016 16:57, Fergus Daly wrote:
find dirname -type f | xargs sed -i 's/string1/string2/g'
.. just hangs.
 sed is unchanged from at least 2013, so it must be something else.
  Is is possible that this is related to a change in the Cygwin library?

Thank you very much for your interest.
I was premature in my assertion that sed "hangs".
But it takes a crazy crazy time.
I was working on a directory of 6000 text files when I reported as above.
This is what happened with a directory of <90 files:

~> find archive -type f | wc
     87      87    1698
~> time find archive -type f | xargs sed -i 's/string1/string2/g'
real    1m2.587s
user    0m1.200s
sys     0m12.884s

More than a minute for 90 files is just extraordinary.
Anybody else having a similar experience?
(Thank you again.)


Not at all

$ find test -type f |wc
    177     177    5119

$ time find test -type f | xargs sed -i -e "s/Octave/Pippo/g"

real    0m5.149s
user    0m0.170s
sys     0m1.183s


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]