technote:list
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| technote:list [2026/02/17 22:33] – [LIST Matching (Using External Pattern Files)] Scott Cunliffe | technote:list [2026/02/18 00:40] (current) – [Example LIST File] Scott Cunliffe | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| This allows a filter field to be compared against multiple patterns, where each pattern is stored as a separate line in the file. | This allows a filter field to be compared against multiple patterns, where each pattern is stored as a separate line in the file. | ||
| - | This is useful when: | + | This is useful when you have a large set of patterns to maintain, want reusable filters shared between operators or scripts or you want to avoid typing long OR-style filters manually. |
| - | + | ||
| - | you have a large set of patterns to maintain, want reusable filters shared between operators or scripts or you want to avoid typing long OR-style filters manually. | + | |
| ===== How LIST Matching Works ===== | ===== How LIST Matching Works ===== | ||
| Line 20: | Line 18: | ||
| TapeTrack will: | TapeTrack will: | ||
| - | + | * open the specified file | |
| - | open the specified file | + | |
| - | + | | |
| - | read the file line-by-line | + | |
| - | + | ||
| - | treat each line as an individual filter pattern | + | |
| - | + | ||
| - | stop as soon as a match is found | + | |
| Each line in the list file is processed as a normal TapeTrack pattern match (wildcards are supported). | Each line in the list file is processed as a normal TapeTrack pattern match (wildcards are supported). | ||
| Line 33: | Line 27: | ||
| ===== Example ===== | ===== Example ===== | ||
| - | Assume the TapeMaster | + | Example set of Description values |
| - | < | + | Production database weekly backup |
| + | Prod DB full backup | ||
| + | Prod data backup set \\ | ||
| + | Production export dump \\ | ||
| + | Development database backup | ||
| + | Weekly archive - finance system | ||
| ==== Example LIST File ==== | ==== Example LIST File ==== | ||
| - | Create a plain text file called: | + | Create a plain text file called |
| - | + | ||
| - | < | + | |
| With the following contents (one pattern per line): | With the following contents (one pattern per line): | ||
| - | < | + | < |
| + | *PRD* | ||
| + | *production* | ||
| + | </ | ||
| + | {{prod_filters.png}} | ||
| ==== Using the LIST Filter in TapeMaster ==== | ==== Using the LIST Filter in TapeMaster ==== | ||
| Line 55: | Line 57: | ||
| This will match any Description containing: | This will match any Description containing: | ||
| - | "prod" | + | prod \\ |
| - | + | PRD \\ | |
| - | "PRD" | + | production |
| - | + | ||
| - | "production" | + | |
| ===== Expected Matching Results ===== | ===== Expected Matching Results ===== | ||
| Line 69: | Line 69: | ||
| The following descriptions would typically match: | The following descriptions would typically match: | ||
| - | Production database weekly backup | + | Production database weekly backup |
| - | + | Prod DB full backup | |
| - | Prod DB full backup | + | Production export dump \\ |
| - | + | PRD database BKP \\ | |
| - | Production export dump | + | Prod data backup set \\ |
| - | + | ||
| - | PRD database BKP | + | |
| - | + | ||
| - | Prod data backup set | + | |
| The following descriptions would typically not match: | The following descriptions would typically not match: | ||
| - | Development database backup | + | Development database backup |
| - | + | Weekly archive - finance system | |
| - | Weekly archive - finance system | + | |
| ===== Using Wildcards in LIST Files ===== | ===== Using Wildcards in LIST Files ===== | ||
| Line 91: | Line 86: | ||
| Example list file contents: | Example list file contents: | ||
| - | < | + | < |
| + | *archive* | ||
| + | *dump* </ | ||
| - | This allows a single LIST filter to match multiple categories of Description | + | This allows a single LIST filter to match multiple categories of text. |
| - | ===== Notes ===== | + | < |
| - | + | ||
| - | LIST files are read sequentially until a match is found. | + | |
| - | + | ||
| - | Blank lines should be avoided. | + | |
| - | + | ||
| - | Each line should contain a valid TapeTrack filter pattern. | + | |
| - | + | ||
| - | LIST filters can be used in TapeMaster filters and TapeTrack CLI filters (where supported). | + | |
| + | LIST files are read sequentially until a match is found. \\ | ||
| + | Blank lines should be avoided. \\ | ||
| + | Each line should contain a valid TapeTrack filter pattern. \\ | ||
| + | LIST filters can be used in TapeMaster filters and TapeTrack CLI filters (where supported). \\ | ||
| + | </ | ||
| ===== Example: Combining LIST with Standard Filters ===== | ===== Example: Combining LIST with Standard Filters ===== | ||
| Line 111: | Line 105: | ||
| For example, a LIST file could contain all patterns related to production backups: | For example, a LIST file could contain all patterns related to production backups: | ||
| - | < | + | < |
| + | *production* | ||
| + | *weekly backup* | ||
| + | *full backup* </ | ||
| Then the TapeMaster Description filter can be applied as: | Then the TapeMaster Description filter can be applied as: | ||
| Line 117: | Line 114: | ||
| < | < | ||
| - | This provides a centralised | + | This provides a centralized |
| + | |||
| + | |||
| + | LIST filtering provides a simple way to match a field against multiple patterns stored in an external file. It is ideal for environments where filtering rules must be maintained and reused across operators, jobs, or automation scripts. | ||
| + | |||
| + | =====See Also===== | ||
| - | ===== Summary ===== | + | [[general: |
| + | [[technote: | ||
| - | LIST filtering provides a simple way to match a field against multiple patterns stored in an external file. | ||
| - | It is ideal for environments where filtering rules must be maintained and reused across operators, jobs, or automation scripts. | + | {{tag> technote pattern string}} |
technote/list.1771367591.txt.gz · Last modified: 2026/02/17 22:33 by Scott Cunliffe
