BASH and wildcard expansion

Joe Zeff joe at zeff.us
Mon Aug 19 20:08:38 UTC 2013


On 08/19/2013 12:51 PM, Mark Haney wrote:
> I can (and am) using the date command in a variable.  But, the filename
> is not just backup-08-18-2013.zip, which isn't a problem to do.  The
> problem is the filename is variable /outside/ the date.  For example:
> backup-08-18-2013--1215.zip.  I can VAR the date parts, but that '1215'
> part I need to wildcard.  Does that make more sense?

I wasn't sure how you were getting the date.  I was, however, clear that 
there were parts of the filename that both varied and weren't related to 
the date.  And, by the way you reply, putting the date in the correct 
format on the command line isn't an option.  (If you're worried about 
getting the format wrong, or having somebody else use the script and 
fscking it up, I don't blame you; I'd want to do the parsing inside the 
script too.)


More information about the users mailing list