On Thu, Dec 25, 2008 at 2:08 PM, Erez D <erez0...@gmail.com> wrote: > The problem is that the file's path varies, so the offset changes. > i could use basename for removing the path, however i could also use sed > .... > > > >> >> Why do you want it in one command ? > > i do not like to use temporary variables (or files) > > it is similiar to 'script1|script2' vs. 'script1 > file ; script2 < file'
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, -- 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