On Wed, 12 Sep 2007 17:02:09 -0000,
littlehere@gmail.com
<littlehere@gmail.com> wrote:
>
>
> That looks to be the solution. Thanks. Also, for my own reference
> what does ${i#*_} expand to? Obviously $i. But what about the bit
> after? Thanks.
>
(from the zsh man page, but this applies to all POSIX shells)
${name#pattern}
${name##pattern}
If the pattern matches the beginning of the value of name, then
substitute the value of name with the matched portion deleted;
otherwise, just substitute the value of name. In the first
form, the smallest matching pattern is preferred; in the second
form, the largest matching pattern is preferred.
${name%pattern}
${name%%pattern}
[replace "beginning" with "end" in the above paragraph.]
--
BOFH excuse #376:
Budget cuts forced us to sell all the power cords for the servers.