I appreciate this is a little off topic, but a colleague and I've googled for most of this morning with no joy. This is my last port of call, so any help would be gratefully appreciated.
I have a process running on Debian which uses glob to scan for incoming files of a certain type. Currently we use a file spec something like *_{process,read}_* This works great on files with names like:
abc_read_today.dat
The trouble is, that for operational reasons, the format is going to change so that a file could now be called:
abc_leave_today+abc_read_today.dat
We only want to process a file if it has 'read' or 'process' before the first '+'. Does anyone have any ideas on this?
We have looked into doing a glob on the file spec, then splitting the file on the '+' and doing a Perl regex on the file spec. This is the plan of last resort as I am not 100% happy that we can reliably convert the file specs to Perl regexs.
As I said, sorry that this isn’t strictly Perl, but it is in relation to a Perl process.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.