On Sat, Dec 27, 2008 at 10:47 PM, Erez D <erez0...@gmail.com> wrote: > > > On Fri, Dec 26, 2008 at 11:15 PM, Oleg Goldshmidt <p...@goldshmidt.org> > wrote: >> >> Well, if you insist, assuming that all the files have >> "<whatever>input_" in the beginning, you can use >> ${parameter/pattern/string} substitution, e.g., for string $foo use >> >> $ basename ${foo/*input_/} .txt >> >> Hope it helps, > > how does that extract the '000' from '<path>/input_000.txt' ?
Well, "${foo/*input_/}" strips "input_" and whatever precedes it, and basename strips the ".txt" extension from what is left, leaving you with "000". I thought it was clear, sorry if it wasn't. -- Oleg Goldshmidt | p...@nospam.goldshmidt.org ================================================================= To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il