Re: a very slow problem of replacing string

2010-09-24 Thread Chet Ramey
On 9/24/10 8:19 AM, Greg Wooledge wrote: > On Thu, Sep 23, 2010 at 10:12:28PM +0900, sky wrote: >> # >> # prepare 1000 strings of 6 digits >> # >> TEST_LIST=`seq 100100 100 20` >> echo $TEST_LIST | wc > > Actually, this is one gigantic string, not 1000 strings. > >> # >> # delete "15" >>

Re: a very slow problem of replacing string

2010-09-24 Thread Greg Wooledge
On Thu, Sep 23, 2010 at 10:12:28PM +0900, sky wrote: > # > # prepare 1000 strings of 6 digits > # > TEST_LIST=`seq 100100 100 20` > echo $TEST_LIST | wc Actually, this is one gigantic string, not 1000 strings. > # > # delete "15" > # > T0=$SECONDS > A=${TEST_LIST//15} > T1=$SECONDS >

a very slow problem of replacing string

2010-09-23 Thread sky
output: Linux fedora14 2.6.35-0.57.rc6.git1.fc14.x86_64 #1 SMP Mon Jul 26 22:43:02 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux Machine Type: x86_64-redhat-linux-gnu Bash Version: 4.1 Patch Level: 7 Release Status: release Description: I am a programmer working in Japan. I encountered