Search code examples
shellautosysjil

Having issue with file appended with date in JIL script


I have a file watcher job, which is expecting to receive daily file with date appended.

 insert_job: FILE_WATCHER   job_type: FW 
 box_name: abc_BOX
 machine: abc.com
 owner: dev
 permission: mx,me
 date_conditions: 0
 job_terminator: 1
 alarm_if_fail: 0
 alarm_if_terminated: 0
 watch_file: "/somelocation/FILE_`date +%Y%m%d`.csv"

But this date formatter is failing. Can anyone please suggest any better option.

Thanks,


Solution

  • I have found a simple fix for the solution:

    watch_file: "/somelocation/FILE_*.csv"
    

    Sometimes answer is simple and we try to think a lot more than that