Erm, here it is in a less unreadable format: #!/usr/bin/env bash typeset -a a=( curl --header 'Host: v33.veehd.com' --header 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0' --header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' --header 'Accept-Language: en-US,en;q=0.5' --header 'Accept-Encoding: gzip, deflate' --header 'Referer: http://veehd.com/vpi?h=NDcwNjgyNXw0ODB8ODQ2Ljh8ZGl2eHwzfDUwMDB8MTM2NTUzNzQ1OHwxNTJ8MXw0NTNmOTA3NDY1Yjg3ZmM5MjI0MTI$' --header 'Cookie: __utma=163375675.149191626.1365449922.1365465732.1365537650.4;__utmz=163375675.1365465732.3.2.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided);__utmb=163375675.1.10.1365537650; __utmc=163375675' --header 'Connection: keep-alive' 'http://v33.veehd.com/dl/45c2f8a516118e29917ff154fee0179e/1365544663/5000.4706825.avi&b=390' -o '4706825.avi' -L )
time : "${a[*]//[0-9]/z}" time : "${a[*]//+([0-9])/z}" I can't reproduce using the above code. $ bash ./testcases/substperf real 0m0.000s user 0m0.000s sys 0m0.000s real 0m0.000s user 0m0.000s sys 0m0.000s As an aside, don't store commands in variables. http://mywiki.wooledge.org/BashFAQ/050 -- Dan Douglas