On Thursday 18 September 2003 2:32 pm, MJ Ray wrote:
> >Â I'm looping through a list of words in a file, passed in as
> >Â variables, and
> >Â performing an action on it, Â but first I need to strip the ".ipk"
> >Â from the
> >Â word.
>
> That's a different problem to the one you asked. Â If the word is
> stored in the variable $word, then ${word/%.ipk/} will contain what
> you need in bash. Â If you're using another shell, let me know.
That's exactly what I was after - many thanks.
I later realised the filename also had to have a version number stripped from
it, but the above syntax took care of that as well, with a small amount of
twiddling.
Jen