wildcard expansion

convert wildcard in file name into relevant static file name

Sometimes you might encounter cases when files are named somewhat weird and makes it hard to use them for automated analysis purposes. In such cases, wildcard expansion becomes a very useful concept. For example, some applications tend to write their logs into log files with some additional information in file names, like:

[root@linux ~]# ls -l /var/log/demo/
total 76
-rw-r--r-- 1 root root 19125 Mar 15 13:48 2024-03-13.demo.log
-rw-r--r-- 1 root root 29580 Mar 15 13:49 2024-03-14.demo.log
-rw-r--r-- 1 root root 22100 Mar 15 13:49 2024-03-15.demo.log
[root@linux ~]#

Say log file is being written to as long as calendar date matches the current one. And what if you want to set some automated analysis of such log files, but to do it only for the relevant one, to which application currently writes?

Continue reading