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