Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

No such file or directory: 'sample_logs/counter_2018-05-01.log' #7

@pdurbin

Description

@pdurbin

I'm finding that when I run Counter Processor for the first time I have to touch or create files for all the days leading up to the days that I actually have logs.

For example, if counter_2018-05-08.log is my only log file, I'll touch the files for 01 through 07 like this:

touch sample_logs/counter_2018-05-01.log
touch sample_logs/counter_2018-05-02.log
touch sample_logs/counter_2018-05-03.log
touch sample_logs/counter_2018-05-04.log
touch sample_logs/counter_2018-05-05.log
touch sample_logs/counter_2018-05-06.log
touch sample_logs/counter_2018-05-07.log

In practice, I just touch all the possible dates like this:

for i in `echo {01..31}`; do
  # avoid errors like: No such file or directory: 'sample_logs/counter_2018-05-01.log'
  touch sample_logs/counter_2018-05-$i.log
done

Is this a bug or am I simply confused or doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions