how can i use regex to get a certain string of a file

Posted by chun on Stack Overflow See other posts from Stack Overflow or by chun
Published on 2010-04-20T09:26:22Z Indexed on 2010/04/20 15:03 UTC
Read the original article Hit count: 245

Filed under:
|

Hi

with linux bash shell , how can i use regex to get a certain string of a file

by example:

for filename *.tgz do

"get the certain string of filename (in my case, get 2010.04.12 of file 2010.01.12myfile.tgz)"

done

or should I turn to perl

Merci

frank

© Stack Overflow or respective owner

Related posts about linux

Related posts about bash